Skip to content

Instantly share code, notes, and snippets.

@bnutz
Last active March 15, 2018 03:30
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 bnutz/4c6ddd9a2978d04968f6d270e71ce469 to your computer and use it in GitHub Desktop.
Save bnutz/4c6ddd9a2978d04968f6d270e71ce469 to your computer and use it in GitHub Desktop.
Bookmarklet for disabling the new Polymer interface on YouTube (for more reliable Chromecast controls)
/*
The new (2017) YouTube interface is quite pretty (especially Dark Mode), but doesn't play nice with Chromecast controls (yet).
Until this is fixed, can use this bookmarklet to easily go back to the old YT interface with the more robust casting controls.
All this does is just add an extra query string parameter to the current URL: disable_polymer=true
To use, create a new bookmark in your browser, name it whatever you want, and then copy and past the code below into the address field.
Now when on any YouTube page and you need to go back to the old interface - click your new bookmarklet and it will automagically disable the new interface.
Adapted from: https://stackoverflow.com/a/20678352
*/
javascript: (function() {
var loc = location.href;
if (loc.indexOf('disable_polymer') >= 0) return;
loc.indexOf("?") < 0 ? (location.href = loc + "?disable_polymer=true") : (location.href = loc + "&disable_polymer=true");
})();
javascript:(function(){var loc=location.href;if(loc.indexOf('disable_polymer')>=0)return;loc.indexOf("?")<0?(location.href=loc+"?disable_polymer=true"):(location.href=loc+"&disable_polymer=true");})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment