Skip to content

Instantly share code, notes, and snippets.

@dclstn
Last active January 3, 2025 19:18
Show Gist options
  • Select an option

  • Save dclstn/eae2aea2e20585763c9ed9dba2b60003 to your computer and use it in GitHub Desktop.

Select an option

Save dclstn/eae2aea2e20585763c9ed9dba2b60003 to your computer and use it in GitHub Desktop.
Revert new twitch-layout script
  1. Navigate to www.twitch.tv
  2. Open the console "Cmd + Option + J" (on a Mac) or "Ctrl + Shift + J" (on Windows)
  3. Copy script below, and paste into console
  4. Enjoy the old layout
(async () => {
    await import('https://cdn.jsdelivr.net/npm/js-cookie@3.0.5/dist/js.cookie.min.js');
    const experiments = Object.entries(__twilightSettings.experiments);
    const [experimentId] = experiments.find(([, {name}]) => name === 'web_channel_metadata_layout');
    const decodedExperimentOverrides = JSON.parse(decodeURIComponent(Cookies.get('experiment_overrides')));
    decodedExperimentOverrides.experiments[experimentId] = 'control';
    Cookies.set('experiment_overrides', JSON.stringify(decodedExperimentOverrides), {expires: 365, domain: '.twitch.tv'});
    window.location.reload();
})();
@dclstn

dclstn commented Jan 3, 2025

Copy link
Copy Markdown
Author

Adding here, twitch has since reverted this experiment, so the code above is now redundant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment