Last active
November 22, 2019 14:19
-
-
Save jettero/9ffdfa504d6f1d115fe9ae0cdb1ba186 to your computer and use it in GitHub Desktop.
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 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