Skip to content

Instantly share code, notes, and snippets.

@th3an7
Created June 9, 2022 07:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save th3an7/0d851dc19db6511d71aaf4f02713403d to your computer and use it in GitHub Desktop.
Save th3an7/0d851dc19db6511d71aaf4f02713403d to your computer and use it in GitHub Desktop.
Automatically enable Twitch WARP experiment with FrankerFaceZ
// ==UserScript==
// @name AutoWARP
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Auto enable Twitch WARP experiment
// @author Th3Ant
// @match https://www.twitch.tv/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=twitch.tv
// @grant unsafeWindow
// ==/UserScript==
(function() {
'use strict';
function waitForFFZ() {
setTimeout(function() {
if (unsafeWindow.ffz == undefined) {
console.log('Waiting...');
waitForFFZ();
}
else {
if (unsafeWindow.ffz.experiments.Cookie.getJSON().experiment_overrides.experiments['e5c813df-a190-4def-b0cb-932224c989f1'] != 'treatment') {
unsafeWindow.ffz.experiments.setTwitchOverride('e5c813df-a190-4def-b0cb-932224c989f1', 'treatment');
console.log('Experiment enabled - reloading webpage...');
location.reload();
}
else {
console.log('Experiment already enabled...');
return;
}
}
}, 1000)
}
document.addEventListener('load', waitForFFZ());
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment