Open guttir14 opened 4 years ago
just post request to gql.twitch.tv/gql with Autorization token ( {Authorization: "Oauth " + cookie.token} ) in header and with body:
{ "operationName": "OnsiteNotifications_ListNotifications", "variables": { "limit": 3, "cursor": "", "language": "en" }, "extensions": { "persistedQuery": { "version": 1, "sha256Hash": "b317b93ed481bf07c35defbcf01848f09744805ebb640734763298f9a7dfd64f" } } }
If result contains "You just received the **VALORANT**" then valorant has been dropped and we can console.log('dropped') and process.exit()
"You just received the **VALORANT**"
Also, to easy get token you can use next script in your browser console:
newWin=window.open("about:blank","","width=350,height=10");newWin.document.write(JSON.stringify(Object({token:cookies["auth-token"]})))
Or just emulate click on notifications button
Can you make a pull request please?
just post request to gql.twitch.tv/gql with Autorization token ( {Authorization: "Oauth " + cookie.token} ) in header and with body:
If result contains
"You just received the **VALORANT**"
then valorant has been dropped and we can console.log('dropped') and process.exit()Also, to easy get token you can use next script in your browser console: