NOTICE: By continued use of this site you understand and agree to the binding Terms of Service and Privacy Policy.
// ==UserScript==
// @name Disable Polymer YouTube
// @description Disabled the new 2017 YouTube Redesign (polymer) from appearing on page load.
// @author Jason Maggiacomo
// @license MIT
// @version 1.0
// @match *://*.youtube.com/*
// @run-at document-start
// @grant none
// ==/UserScript==
try {
var url = document.location.toString();
var updateUrl = updateQueryStringParameter(url, 'disable_polymer', 'true');
document.execCommand('Stop'); //helps improve some performance
if (url != updateUrl) {
document.location = updateUrl;
}
} catch (e) {}
function updateQueryStringParameter(uri, key, value) {
var re = new RegExp("([?&])" + key + "=.*?(&|$)", "i");
var separator = uri.indexOf('?') !== -1 ? "&" : "?";
if (uri.match(re)) {
return uri.replace(re, '$1' + key + "=" + value + '$2');
} else {
return uri + separator + key + "=" + value;
}
}