Advertisement
Guest User

Untitled

a guest
Jul 9th, 2020
3,800
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.90 KB | None | 0 0
  1. // ==UserScript==
  2. // @name NEW POLYMER DISABLE
  3. // @namespace local
  4. // @version 0.1
  5. // @match http*://*.youtube.com/*
  6. // @grant none
  7. // @run-at document-start
  8. // ==/UserScript==
  9.  
  10. (function() {
  11. 'use strict';
  12. var href = document.location.href;
  13.  
  14. if (href.indexOf("/embed/") == -1 && href.indexOf("studio." == -1)) {
  15. if (href.indexOf("disable_polymer") == -1) {
  16. document.location += (href.indexOf("?") == -1 ? "?":"&") + "app=desktop&disable_polymer=1";
  17. }
  18. }
  19. var locationhref = location.href;
  20. Refresh();
  21. function Refresh(){
  22. if((locationhref != location.href && location.href.indexOf("app") == -1) || document.documentElement.innerHTML.indexOf("<!doctype html>") != -1){
  23. location = location;
  24. }
  25. else{
  26. setTimeout(function(){ Refresh() }, 1);
  27. }
  28. }
  29. })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement