Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update TwitchAdSolutions scriptlet #232

Merged
merged 1 commit into from
Jan 29, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions resources/vaft-ublock-origin.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
(function() {
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) {
console.log("skipping vaft as there's another script active. ourVersion:" + ourTwitchAdSolutionsVersion + " activeVersion:" + window.twitchAdSolutionsVersion);
window.twitchAdSolutionsVersion = ourTwitchAdSolutionsVersion;
Expand Down Expand Up @@ -33,7 +33,8 @@
var IsPlayerAutoQuality = null;
var workerStringConflicts = [
'twitch',
'isVariantA'// TwitchNoSub
'isVariantA',// TwitchNoSub
'besuper/'// TwitchNoSub (0.9)
];
var workerStringAllow = [];
//
Expand All @@ -46,7 +47,8 @@
// 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
var workerStringReinsert = [
'isVariantA'// TwitchNoSub
'isVariantA',// TwitchNoSub
'besuper/'// TwitchNoSub (0.9)
];
function getCleanWorker(worker) {
var root = null;
Expand Down
8 changes: 5 additions & 3 deletions resources/video-swap-new-ublock-origin.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
(function() {
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) {
console.log("skipping video-swap-new as there's another script active. ourVersion:" + ourTwitchAdSolutionsVersion + " activeVersion:" + window.twitchAdSolutionsVersion);
window.twitchAdSolutionsVersion = ourTwitchAdSolutionsVersion;
Expand Down Expand Up @@ -32,7 +32,8 @@
var twitchWorkers = [];
var workerStringConflicts = [
'twitch',
'isVariantA'// TwitchNoSub
'isVariantA',// TwitchNoSub
'besuper/'// TwitchNoSub (0.9)
];
var workerStringAllow = [];
//
Expand All @@ -45,7 +46,8 @@
// 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
var workerStringReinsert = [
'isVariantA'// TwitchNoSub
'isVariantA',// TwitchNoSub
'besuper/'// TwitchNoSub (0.9)
];
function getCleanWorker(worker) {
var root = null;
Expand Down
Loading