Last active
May 28, 2021 07:41
-
-
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.
This file contains 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 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