1
0
mirror of https://github.com/pixeltris/TwitchAdSolutions.git synced 2024-11-22 02:12:45 +01:00

Avoid throwing error on null integrity

The integrity checks are currently tentative and the throw is causing loading errors
This commit is contained in:
pixeltris 2023-06-01 23:16:23 +01:00
parent 56af14e91a
commit 2bfda1e1a1
4 changed files with 8 additions and 8 deletions

View File

@ -663,8 +663,8 @@ twitch-videoad.js text/javascript
} }
function gqlRequest(body, realFetch) { function gqlRequest(body, realFetch) {
if (ClientIntegrityHeader == null) { if (ClientIntegrityHeader == null) {
console.error('ClientIntegrityHeader is null'); console.warn('ClientIntegrityHeader is null');
throw 'ClientIntegrityHeader is null'; //throw 'ClientIntegrityHeader is null';
} }
var fetchFunc = realFetch ? realFetch : fetch; var fetchFunc = realFetch ? realFetch : fetch;
if (!GQLDeviceID) { if (!GQLDeviceID) {

View File

@ -674,8 +674,8 @@
} }
function gqlRequest(body, realFetch) { function gqlRequest(body, realFetch) {
if (ClientIntegrityHeader == null) { if (ClientIntegrityHeader == null) {
console.error('ClientIntegrityHeader is null'); console.warn('ClientIntegrityHeader is null');
throw 'ClientIntegrityHeader is null'; //throw 'ClientIntegrityHeader is null';
} }
var fetchFunc = realFetch ? realFetch : fetch; var fetchFunc = realFetch ? realFetch : fetch;
if (!GQLDeviceID) { if (!GQLDeviceID) {

View File

@ -314,8 +314,8 @@ twitch-videoad.js text/javascript
} }
function gqlRequest(body, realFetch) { function gqlRequest(body, realFetch) {
if (ClientIntegrityHeader == null) { if (ClientIntegrityHeader == null) {
console.error('ClientIntegrityHeader is null'); console.warn('ClientIntegrityHeader is null');
throw 'ClientIntegrityHeader is null'; //throw 'ClientIntegrityHeader is null';
} }
var fetchFunc = realFetch ? realFetch : fetch; var fetchFunc = realFetch ? realFetch : fetch;
return fetchFunc('https://gql.twitch.tv/gql', { return fetchFunc('https://gql.twitch.tv/gql', {

View File

@ -325,8 +325,8 @@
} }
function gqlRequest(body, realFetch) { function gqlRequest(body, realFetch) {
if (ClientIntegrityHeader == null) { if (ClientIntegrityHeader == null) {
console.error('ClientIntegrityHeader is null'); console.warn('ClientIntegrityHeader is null');
throw 'ClientIntegrityHeader is null'; //throw 'ClientIntegrityHeader is null';
} }
var fetchFunc = realFetch ? realFetch : fetch; var fetchFunc = realFetch ? realFetch : fetch;
return fetchFunc('https://gql.twitch.tv/gql', { return fetchFunc('https://gql.twitch.tv/gql', {