Skip to content

Instantly share code, notes, and snippets.

@tripulse
Last active September 2, 2018 12:08
Show Gist options
  • Save tripulse/947b8b9e8b73fc9df94b5b4ab755abae to your computer and use it in GitHub Desktop.
Save tripulse/947b8b9e8b73fc9df94b5b4ab755abae to your computer and use it in GitHub Desktop.
Tweaks URL little bit and bring old YouTube layout
// ==UserScript==
// @name YouTube Old Layout
// @description Tweaks URL little bit and bring old YouTube layout.
// @match *://www.youtube.com/*
// @exclude *://www.youtube.com/embed/*
// @grant none
// @run-at document-start
// @version 2.0
// ==/UserScript==
(function() {
/** Grabbing Current URL and preventing page from load **/
var URI = new URL(location.href);
document.execCommand("stop");
/** Sets the QueryParameter and reloads the page **/
URI.searchParams.set("disable_polymer", "true");
if(location.href != URI.href) location.href = URI.href;
})();
@tripulse
Copy link
Author

tripulse commented Sep 2, 2018

The code is for Tampermonkey addon.
Here's how to Install this.

PROTIP: Remove 1-8 lines in code if you're not using Tampermonkey.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment