From 2bfda1e1a1c55d7b2dd4a541242acb5033644237 Mon Sep 17 00:00:00 2001 From: pixeltris <6952411+pixeltris@users.noreply.github.com> Date: Thu, 1 Jun 2023 23:16:23 +0100 Subject: [PATCH] Avoid throwing error on null integrity The integrity checks are currently tentative and the throw is causing loading errors --- vaft/vaft-ublock-origin.js | 4 ++-- vaft/vaft.user.js | 4 ++-- video-swap-new/video-swap-new-ublock-origin.js | 4 ++-- video-swap-new/video-swap-new.user.js | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/vaft/vaft-ublock-origin.js b/vaft/vaft-ublock-origin.js index 6c1a1a6..ce76969 100644 --- a/vaft/vaft-ublock-origin.js +++ b/vaft/vaft-ublock-origin.js @@ -663,8 +663,8 @@ twitch-videoad.js text/javascript } function gqlRequest(body, realFetch) { if (ClientIntegrityHeader == null) { - console.error('ClientIntegrityHeader is null'); - throw 'ClientIntegrityHeader is null'; + console.warn('ClientIntegrityHeader is null'); + //throw 'ClientIntegrityHeader is null'; } var fetchFunc = realFetch ? realFetch : fetch; if (!GQLDeviceID) { diff --git a/vaft/vaft.user.js b/vaft/vaft.user.js index c6e3e83..8635105 100644 --- a/vaft/vaft.user.js +++ b/vaft/vaft.user.js @@ -674,8 +674,8 @@ } function gqlRequest(body, realFetch) { if (ClientIntegrityHeader == null) { - console.error('ClientIntegrityHeader is null'); - throw 'ClientIntegrityHeader is null'; + console.warn('ClientIntegrityHeader is null'); + //throw 'ClientIntegrityHeader is null'; } var fetchFunc = realFetch ? realFetch : fetch; if (!GQLDeviceID) { diff --git a/video-swap-new/video-swap-new-ublock-origin.js b/video-swap-new/video-swap-new-ublock-origin.js index d75f16c..b2d4413 100644 --- a/video-swap-new/video-swap-new-ublock-origin.js +++ b/video-swap-new/video-swap-new-ublock-origin.js @@ -314,8 +314,8 @@ twitch-videoad.js text/javascript } function gqlRequest(body, realFetch) { if (ClientIntegrityHeader == null) { - console.error('ClientIntegrityHeader is null'); - throw 'ClientIntegrityHeader is null'; + console.warn('ClientIntegrityHeader is null'); + //throw 'ClientIntegrityHeader is null'; } var fetchFunc = realFetch ? realFetch : fetch; return fetchFunc('https://gql.twitch.tv/gql', { diff --git a/video-swap-new/video-swap-new.user.js b/video-swap-new/video-swap-new.user.js index 9ad28bc..e784722 100644 --- a/video-swap-new/video-swap-new.user.js +++ b/video-swap-new/video-swap-new.user.js @@ -325,8 +325,8 @@ } function gqlRequest(body, realFetch) { if (ClientIntegrityHeader == null) { - console.error('ClientIntegrityHeader is null'); - throw 'ClientIntegrityHeader is null'; + console.warn('ClientIntegrityHeader is null'); + //throw 'ClientIntegrityHeader is null'; } var fetchFunc = realFetch ? realFetch : fetch; return fetchFunc('https://gql.twitch.tv/gql', {