-
-
Save revunix/e6e9b184f52bb744799a8cf7f3176653 to your computer and use it in GitHub Desktop.
Automatically enable Twitch experiments with FrankerFaceZ
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name FFZ+ | Set experiments | |
// @namespace http://tampermonkey.net/ | |
// @version 0.3 | |
// @description Auto enable experiments | |
// @author revunix (fork of th3an7 AutoWARP) | |
// @match https://www.twitch.tv/* | |
// @icon https://cdn0.iconfinder.com/data/icons/social-network-7/50/16-512.png | |
// @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['994869b7-223b-4d34-b30c-46b403d6468b'] != 'treatment') { | |
unsafeWindow.ffz.experiments.setTwitchOverride('ce577266-68fa-40eb-8c07-5ae30488338f', 'control'); // Navbar Hover (on = treatment – off = control) | |
unsafeWindow.ffz.experiments.setTwitchOverride('e51fb97f-1dcd-4ba6-8177-81a911b6bf7d', 'variant1'); // New Category (on = variant1 – off = control) | |
unsafeWindow.ffz.experiments.setTwitchOverride('a1fa14d1-a9bd-40a0-83df-c5b6767d5a28', 'variant'); // Navbar Color (on = variant – off = control) | |
unsafeWindow.ffz.experiments.setTwitchOverride('372a1386-6285-439b-8439-bdb320d83e78', 'variant1'); // Navbar Popup (on = variant1 – off = control) | |
unsafeWindow.ffz.experiments.setTwitchOverride('b8c26067-ebc7-4942-8c7d-14beec8a2d85', 'variant'); // Hide MiniPlay (on = variant – off = control) | |
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