Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name NEW POLYMER DISABLE
- // @namespace local
- // @version 0.1
- // @match http*://*.youtube.com/*
- // @grant none
- // @run-at document-start
- // ==/UserScript==
- (function() {
- 'use strict';
- var href = document.location.href;
- if (href.indexOf("/embed/") == -1 && href.indexOf("studio." == -1)) {
- if (href.indexOf("disable_polymer") == -1) {
- document.location += (href.indexOf("?") == -1 ? "?":"&") + "app=desktop&disable_polymer=1";
- }
- }
- var locationhref = location.href;
- Refresh();
- function Refresh(){
- if((locationhref != location.href && location.href.indexOf("app") == -1) || document.documentElement.innerHTML.indexOf("<!doctype html>") != -1){
- location = location;
- }
- else{
- setTimeout(function(){ Refresh() }, 1);
- }
- }
- })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement