Skip to content

Instantly share code, notes, and snippets.

@jettero
Last active November 22, 2019 14:19
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 jettero/9ffdfa504d6f1d115fe9ae0cdb1ba186 to your computer and use it in GitHub Desktop.
Save jettero/9ffdfa504d6f1d115fe9ae0cdb1ba186 to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name No Polymer Youtube Homepage
// @namespace https://gist.github.com/jettero
// @version 0.3
// @description Google keeps pusing their new shitty homepage layout with 4 recommendations. This is clearly to make advertising computation easier, but: no thanks. Until they break their classic view, that's how ima look at it.
// @author jettero
// @match https://www.youtube.com/*
// @downloadURL https://gist.github.com/jettero/9ffdfa504d6f1d115fe9ae0cdb1ba186/raw/no-polymer-youtube-home.user.js
// @grant none
// ==/UserScript==
const fixme = (event) => {
console.log(`fixme ${event.type} location ${window.location.href}`);
if ( window.location.href === "https://www.youtube.com/" ) {
window.location.href = "https://www.youtube.com/?disable_polymer=1";
}
};
fixme(false);
(function() {
'use strict';
window.addEventListener('pageshow', fixme, false);
window.addEventListener('pagehide', fixme, false);
window.addEventListener('unload', fixme, false);
window.addEventListener('load', fixme, false);
window.addEventListener('click', fixme, false);
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment