Fix conflict with latest TwitchNoSub

Ref:
- https://github.com/besuper/TwitchNoSub/issues/170
- de53b95339
This commit is contained in:
pixeltris 2025-01-23 11:02:49 +00:00
parent 8a9a25ae9d
commit b3bd44e8d5
4 changed files with 22 additions and 14 deletions

View File

@ -1,7 +1,7 @@
twitch-videoad.js text/javascript twitch-videoad.js text/javascript
(function() { (function() {
if ( /(^|\.)twitch\.tv$/.test(document.location.hostname) === false ) { return; } if ( /(^|\.)twitch\.tv$/.test(document.location.hostname) === false ) { return; }
var ourTwitchAdSolutionsVersion = 1;// 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 = 2;// 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 (window.twitchAdSolutionsVersion && window.twitchAdSolutionsVersion >= ourTwitchAdSolutionsVersion) { if (window.twitchAdSolutionsVersion && window.twitchAdSolutionsVersion >= ourTwitchAdSolutionsVersion) {
console.log("skipping vaft as there's another script active. ourVersion:" + ourTwitchAdSolutionsVersion + " activeVersion:" + window.twitchAdSolutionsVersion); console.log("skipping vaft as there's another script active. ourVersion:" + ourTwitchAdSolutionsVersion + " activeVersion:" + window.twitchAdSolutionsVersion);
window.twitchAdSolutionsVersion = ourTwitchAdSolutionsVersion; window.twitchAdSolutionsVersion = ourTwitchAdSolutionsVersion;
@ -34,7 +34,8 @@ twitch-videoad.js text/javascript
var IsPlayerAutoQuality = null; var IsPlayerAutoQuality = null;
var workerStringConflicts = [ var workerStringConflicts = [
'twitch', 'twitch',
'isVariantA'// TwitchNoSub 'isVariantA',// TwitchNoSub
'besuper/'// TwitchNoSub (0.9)
]; ];
var workerStringAllow = []; var workerStringAllow = [];
// //
@ -47,7 +48,8 @@ twitch-videoad.js text/javascript
// This is because their script ignores the incoming blob (our script) and replaces it with their own importScripts call // This is because their script ignores the incoming blob (our script) and replaces it with their own importScripts call
// To fix this we scoop out TwitchNoSub and re-insert it so that it inherits from our worker // To fix this we scoop out TwitchNoSub and re-insert it so that it inherits from our worker
var workerStringReinsert = [ var workerStringReinsert = [
'isVariantA'// TwitchNoSub 'isVariantA',// TwitchNoSub
'besuper/'// TwitchNoSub (0.9)
]; ];
function getCleanWorker(worker) { function getCleanWorker(worker) {
var root = null; var root = null;

View File

@ -1,7 +1,7 @@
// ==UserScript== // ==UserScript==
// @name TwitchAdSolutions (vaft) // @name TwitchAdSolutions (vaft)
// @namespace https://github.com/pixeltris/TwitchAdSolutions // @namespace https://github.com/pixeltris/TwitchAdSolutions
// @version 15.0.0 // @version 16.0.0
// @description Multiple solutions for blocking Twitch ads (vaft) // @description Multiple solutions for blocking Twitch ads (vaft)
// @updateURL https://github.com/pixeltris/TwitchAdSolutions/raw/master/vaft/vaft.user.js // @updateURL https://github.com/pixeltris/TwitchAdSolutions/raw/master/vaft/vaft.user.js
// @downloadURL https://github.com/pixeltris/TwitchAdSolutions/raw/master/vaft/vaft.user.js // @downloadURL https://github.com/pixeltris/TwitchAdSolutions/raw/master/vaft/vaft.user.js
@ -13,7 +13,7 @@
// ==/UserScript== // ==/UserScript==
(function() { (function() {
'use strict'; 'use strict';
var ourTwitchAdSolutionsVersion = 1;// 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 = 2;// 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 (window.twitchAdSolutionsVersion && window.twitchAdSolutionsVersion >= ourTwitchAdSolutionsVersion) { if (window.twitchAdSolutionsVersion && window.twitchAdSolutionsVersion >= ourTwitchAdSolutionsVersion) {
console.log("skipping vaft as there's another script active. ourVersion:" + ourTwitchAdSolutionsVersion + " activeVersion:" + window.twitchAdSolutionsVersion); console.log("skipping vaft as there's another script active. ourVersion:" + ourTwitchAdSolutionsVersion + " activeVersion:" + window.twitchAdSolutionsVersion);
window.twitchAdSolutionsVersion = ourTwitchAdSolutionsVersion; window.twitchAdSolutionsVersion = ourTwitchAdSolutionsVersion;
@ -46,7 +46,8 @@
var IsPlayerAutoQuality = null; var IsPlayerAutoQuality = null;
var workerStringConflicts = [ var workerStringConflicts = [
'twitch', 'twitch',
'isVariantA'// TwitchNoSub 'isVariantA',// TwitchNoSub
'besuper/'// TwitchNoSub (0.9)
]; ];
var workerStringAllow = []; var workerStringAllow = [];
// //
@ -59,7 +60,8 @@
// This is because their script ignores the incoming blob (our script) and replaces it with their own importScripts call // This is because their script ignores the incoming blob (our script) and replaces it with their own importScripts call
// To fix this we scoop out TwitchNoSub and re-insert it so that it inherits from our worker // To fix this we scoop out TwitchNoSub and re-insert it so that it inherits from our worker
var workerStringReinsert = [ var workerStringReinsert = [
'isVariantA'// TwitchNoSub 'isVariantA',// TwitchNoSub
'besuper/'// TwitchNoSub (0.9)
]; ];
function getCleanWorker(worker) { function getCleanWorker(worker) {
var root = null; var root = null;

View File

@ -1,7 +1,7 @@
twitch-videoad.js text/javascript twitch-videoad.js text/javascript
(function() { (function() {
if ( /(^|\.)twitch\.tv$/.test(document.location.hostname) === false ) { return; } if ( /(^|\.)twitch\.tv$/.test(document.location.hostname) === false ) { return; }
var ourTwitchAdSolutionsVersion = 1;// 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 = 2;// 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 (window.twitchAdSolutionsVersion && window.twitchAdSolutionsVersion >= ourTwitchAdSolutionsVersion) { if (window.twitchAdSolutionsVersion && window.twitchAdSolutionsVersion >= ourTwitchAdSolutionsVersion) {
console.log("skipping video-swap-new as there's another script active. ourVersion:" + ourTwitchAdSolutionsVersion + " activeVersion:" + window.twitchAdSolutionsVersion); console.log("skipping video-swap-new as there's another script active. ourVersion:" + ourTwitchAdSolutionsVersion + " activeVersion:" + window.twitchAdSolutionsVersion);
window.twitchAdSolutionsVersion = ourTwitchAdSolutionsVersion; window.twitchAdSolutionsVersion = ourTwitchAdSolutionsVersion;
@ -33,7 +33,8 @@ twitch-videoad.js text/javascript
var twitchWorkers = []; var twitchWorkers = [];
var workerStringConflicts = [ var workerStringConflicts = [
'twitch', 'twitch',
'isVariantA'// TwitchNoSub 'isVariantA',// TwitchNoSub
'besuper/'// TwitchNoSub (0.9)
]; ];
var workerStringAllow = []; var workerStringAllow = [];
// //
@ -46,7 +47,8 @@ twitch-videoad.js text/javascript
// This is because their script ignores the incoming blob (our script) and replaces it with their own importScripts call // This is because their script ignores the incoming blob (our script) and replaces it with their own importScripts call
// To fix this we scoop out TwitchNoSub and re-insert it so that it inherits from our worker // To fix this we scoop out TwitchNoSub and re-insert it so that it inherits from our worker
var workerStringReinsert = [ var workerStringReinsert = [
'isVariantA'// TwitchNoSub 'isVariantA',// TwitchNoSub
'besuper/'// TwitchNoSub (0.9)
]; ];
function getCleanWorker(worker) { function getCleanWorker(worker) {
var root = null; var root = null;

View File

@ -1,7 +1,7 @@
// ==UserScript== // ==UserScript==
// @name TwitchAdSolutions (video-swap-new) // @name TwitchAdSolutions (video-swap-new)
// @namespace https://github.com/pixeltris/TwitchAdSolutions // @namespace https://github.com/pixeltris/TwitchAdSolutions
// @version 1.33 // @version 1.34
// @updateURL https://github.com/pixeltris/TwitchAdSolutions/raw/master/video-swap-new/video-swap-new.user.js // @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 // @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) // @description Multiple solutions for blocking Twitch ads (video-swap-new)
@ -13,7 +13,7 @@
// ==/UserScript== // ==/UserScript==
(function() { (function() {
'use strict'; 'use strict';
var ourTwitchAdSolutionsVersion = 1;// 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 = 2;// 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 (window.twitchAdSolutionsVersion && window.twitchAdSolutionsVersion >= ourTwitchAdSolutionsVersion) { if (window.twitchAdSolutionsVersion && window.twitchAdSolutionsVersion >= ourTwitchAdSolutionsVersion) {
console.log("skipping video-swap-new as there's another script active. ourVersion:" + ourTwitchAdSolutionsVersion + " activeVersion:" + window.twitchAdSolutionsVersion); console.log("skipping video-swap-new as there's another script active. ourVersion:" + ourTwitchAdSolutionsVersion + " activeVersion:" + window.twitchAdSolutionsVersion);
window.twitchAdSolutionsVersion = ourTwitchAdSolutionsVersion; window.twitchAdSolutionsVersion = ourTwitchAdSolutionsVersion;
@ -45,7 +45,8 @@
var twitchWorkers = []; var twitchWorkers = [];
var workerStringConflicts = [ var workerStringConflicts = [
'twitch', 'twitch',
'isVariantA'// TwitchNoSub 'isVariantA',// TwitchNoSub
'besuper/'// TwitchNoSub (0.9)
]; ];
var workerStringAllow = []; var workerStringAllow = [];
// //
@ -58,7 +59,8 @@
// This is because their script ignores the incoming blob (our script) and replaces it with their own importScripts call // This is because their script ignores the incoming blob (our script) and replaces it with their own importScripts call
// To fix this we scoop out TwitchNoSub and re-insert it so that it inherits from our worker // To fix this we scoop out TwitchNoSub and re-insert it so that it inherits from our worker
var workerStringReinsert = [ var workerStringReinsert = [
'isVariantA'// TwitchNoSub 'isVariantA',// TwitchNoSub
'besuper/'// TwitchNoSub (0.9)
]; ];
function getCleanWorker(worker) { function getCleanWorker(worker) {
var root = null; var root = null;