Skip to content

Instantly share code, notes, and snippets.

@Erquint
Last active May 28, 2021 07:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Erquint/3217102f954d7f1af03c8d494e9511a5 to your computer and use it in GitHub Desktop.
Save Erquint/3217102f954d7f1af03c8d494e9511a5 to your computer and use it in GitHub Desktop.
Disable YouTube's Polymer UI framework, prompting it to fallback to an older one by appending a "disable_polymer=1" parameter to the GET request.
// ==UserScript==
// @name Disable Polymer on YouTube
// @namespace gness.na@gmail.com
// @include *youtube.com*
// @version 1.1
// @description Disable YouTube's Polymer UI framework, prompting it to fallback to an older one by appending a "disable_polymer=1" parameter to the GET request.
// @run-at document-start
// @noframes
// @inject-into page
// ==/UserScript==
if(!window.location.href.includes('disable_polymer'))
{
let postfix = 'disable_polymer=1';
if(window.location.href.includes('?'))
{
postfix = '&' + postfix;
}
else
{
postfix = '?' + postfix;
}
window.location.href += postfix
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment