From cc0008df57459aaeae9305a03a887a3c4c55675b Mon Sep 17 00:00:00 2001 From: pixeltris <6952411+pixeltris@users.noreply.github.com> Date: Thu, 14 Oct 2021 15:03:25 +0100 Subject: [PATCH] Fix broken twitch.tv functionality (#3858) * Fix broken twitch.tv functionality Fixes some features of twitch.tv which are broken due to device id change on every gql request. Related issues: - https://github.com/pixeltris/TwitchAdSolutions/issues/50 - https://github.com/pixeltris/TwitchAdSolutions/issues/45 * Use strict equality --- assets/resources/scriptlets.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/assets/resources/scriptlets.js b/assets/resources/scriptlets.js index 9aed2cd34..1678abc7c 100644 --- a/assets/resources/scriptlets.js +++ b/assets/resources/scriptlets.js @@ -1571,7 +1571,9 @@ typeof url === 'string' && url.includes('gql') && init instanceof Object && - init.headers instanceof Object + init.headers instanceof Object && + typeof init.body === 'string' && + init.body.includes('PlaybackAccessToken') ) { const { headers } = init; if ( typeof headers['X-Device-Id'] === 'string' ) {