From 69a2e17a5b57a265f45a265fa51f9aeb2ae3887f Mon Sep 17 00:00:00 2001 From: pixeltris <6952411+pixeltris@users.noreply.github.com> Date: Sat, 28 Jun 2025 08:46:33 +0100 Subject: [PATCH] Switch soofed header to fix Brave again (userscript) #363 --- vaft/vaft-ublock-origin.js | 4 ++-- vaft/vaft.user.js | 6 +++--- video-swap-new/video-swap-new-ublock-origin.js | 4 ++-- video-swap-new/video-swap-new.user.js | 6 +++--- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/vaft/vaft-ublock-origin.js b/vaft/vaft-ublock-origin.js index 71935c1..66b7b98 100644 --- a/vaft/vaft-ublock-origin.js +++ b/vaft/vaft-ublock-origin.js @@ -1,7 +1,7 @@ twitch-videoad.js text/javascript (function() { if ( /(^|\.)twitch\.tv$/.test(document.location.hostname) === false ) { return; } - var ourTwitchAdSolutionsVersion = 6;// Only bump this when there's a breaking change to Twitch, the script, or there's a conflict with an unmaintained extension which uses this script + var ourTwitchAdSolutionsVersion = 7;// Only bump this when there's a breaking change to Twitch, the script, or there's a conflict with an unmaintained extension which uses this script if (typeof unsafeWindow === 'undefined') { unsafeWindow = window; } @@ -898,7 +898,7 @@ twitch-videoad.js text/javascript } } if (typeof GM !== 'undefined' && typeof GM.xmlHttpRequest !== 'undefined') { - fetchRequest.options.headers['User-Agent'] = 'Mozilla/5.0 (X11; Linux i686; rv:140.0) Gecko/20100101 Firefox/140.0'; + fetchRequest.options.headers['Sec-Ch-Ua'] = '"Google Chrome";v="137", "Chromium";v="137", "Not/A)Brand";v="24"'; fetchRequest.options.headers['Referer'] = 'https://www.twitch.tv/'; fetchRequest.options.headers['Origin'] = 'https://www.twitch.tv/'; fetchRequest.options.headers['Host'] = 'gql.twitch.tv'; diff --git a/vaft/vaft.user.js b/vaft/vaft.user.js index c031dca..f5c58a7 100644 --- a/vaft/vaft.user.js +++ b/vaft/vaft.user.js @@ -1,7 +1,7 @@ // ==UserScript== // @name TwitchAdSolutions (vaft) // @namespace https://github.com/pixeltris/TwitchAdSolutions -// @version 21.0.0 +// @version 22.0.0 // @description Multiple solutions for blocking Twitch ads (vaft) // @updateURL https://github.com/pixeltris/TwitchAdSolutions/raw/master/vaft/vaft.user.js // @downloadURL https://github.com/pixeltris/TwitchAdSolutions/raw/master/vaft/vaft.user.js @@ -14,7 +14,7 @@ // ==/UserScript== (function() { 'use strict'; - var ourTwitchAdSolutionsVersion = 6;// Only bump this when there's a breaking change to Twitch, the script, or there's a conflict with an unmaintained extension which uses this script + var ourTwitchAdSolutionsVersion = 7;// Only bump this when there's a breaking change to Twitch, the script, or there's a conflict with an unmaintained extension which uses this script if (typeof unsafeWindow === 'undefined') { unsafeWindow = window; } @@ -911,7 +911,7 @@ } } if (typeof GM !== 'undefined' && typeof GM.xmlHttpRequest !== 'undefined') { - fetchRequest.options.headers['User-Agent'] = 'Mozilla/5.0 (X11; Linux i686; rv:140.0) Gecko/20100101 Firefox/140.0'; + fetchRequest.options.headers['Sec-Ch-Ua'] = '"Google Chrome";v="137", "Chromium";v="137", "Not/A)Brand";v="24"'; fetchRequest.options.headers['Referer'] = 'https://www.twitch.tv/'; fetchRequest.options.headers['Origin'] = 'https://www.twitch.tv/'; fetchRequest.options.headers['Host'] = 'gql.twitch.tv'; diff --git a/video-swap-new/video-swap-new-ublock-origin.js b/video-swap-new/video-swap-new-ublock-origin.js index 209a499..df3d3b1 100644 --- a/video-swap-new/video-swap-new-ublock-origin.js +++ b/video-swap-new/video-swap-new-ublock-origin.js @@ -1,7 +1,7 @@ twitch-videoad.js text/javascript (function() { if ( /(^|\.)twitch\.tv$/.test(document.location.hostname) === false ) { return; } - var ourTwitchAdSolutionsVersion = 6;// Only bump this when there's a breaking change to Twitch, the script, or there's a conflict with an unmaintained extension which uses this script + var ourTwitchAdSolutionsVersion = 7;// Only bump this when there's a breaking change to Twitch, the script, or there's a conflict with an unmaintained extension which uses this script if (typeof unsafeWindow === 'undefined') { unsafeWindow = window; } @@ -627,7 +627,7 @@ twitch-videoad.js text/javascript } } if (typeof GM !== 'undefined' && typeof GM.xmlHttpRequest !== 'undefined') { - fetchRequest.options.headers['User-Agent'] = 'Mozilla/5.0 (X11; Linux i686; rv:140.0) Gecko/20100101 Firefox/140.0'; + fetchRequest.options.headers['Sec-Ch-Ua'] = '"Google Chrome";v="137", "Chromium";v="137", "Not/A)Brand";v="24"'; fetchRequest.options.headers['Referer'] = 'https://www.twitch.tv/'; fetchRequest.options.headers['Origin'] = 'https://www.twitch.tv/'; fetchRequest.options.headers['Host'] = 'gql.twitch.tv'; diff --git a/video-swap-new/video-swap-new.user.js b/video-swap-new/video-swap-new.user.js index ee2d3bd..5456356 100644 --- a/video-swap-new/video-swap-new.user.js +++ b/video-swap-new/video-swap-new.user.js @@ -1,7 +1,7 @@ // ==UserScript== // @name TwitchAdSolutions (video-swap-new) // @namespace https://github.com/pixeltris/TwitchAdSolutions -// @version 1.39 +// @version 1.40 // @updateURL https://github.com/pixeltris/TwitchAdSolutions/raw/master/video-swap-new/video-swap-new.user.js // @downloadURL https://github.com/pixeltris/TwitchAdSolutions/raw/master/video-swap-new/video-swap-new.user.js // @description Multiple solutions for blocking Twitch ads (video-swap-new) @@ -14,7 +14,7 @@ // ==/UserScript== (function() { 'use strict'; - var ourTwitchAdSolutionsVersion = 6;// Only bump this when there's a breaking change to Twitch, the script, or there's a conflict with an unmaintained extension which uses this script + var ourTwitchAdSolutionsVersion = 7;// Only bump this when there's a breaking change to Twitch, the script, or there's a conflict with an unmaintained extension which uses this script if (typeof unsafeWindow === 'undefined') { unsafeWindow = window; } @@ -640,7 +640,7 @@ } } if (typeof GM !== 'undefined' && typeof GM.xmlHttpRequest !== 'undefined') { - fetchRequest.options.headers['User-Agent'] = 'Mozilla/5.0 (X11; Linux i686; rv:140.0) Gecko/20100101 Firefox/140.0'; + fetchRequest.options.headers['Sec-Ch-Ua'] = '"Google Chrome";v="137", "Chromium";v="137", "Not/A)Brand";v="24"'; fetchRequest.options.headers['Referer'] = 'https://www.twitch.tv/'; fetchRequest.options.headers['Origin'] = 'https://www.twitch.tv/'; fetchRequest.options.headers['Host'] = 'gql.twitch.tv';