Guest User

Untitled

a guest
Jul 24th, 2018
252
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.95 KB | None | 0 0
  1. // ==UserScript==
  2.  
  3. // @name New Userscript
  4.  
  5. // @namespace http://tampermonkey.net/
  6.  
  7. // @version 0.1
  8.  
  9. // @description try to take over the world!
  10.  
  11. // @author You
  12.  
  13. // @match https://www.youtube.com/
  14.  
  15. // @grant none
  16.  
  17. // ==/UserScript==
  18.  
  19.  
  20.  
  21. (function() {
  22.  
  23. 'use strict';
  24.  
  25.  
  26.  
  27. // ==UserScript==
  28.  
  29. // @name YouTube Polymer Disable
  30.  
  31. // @match *://www.youtube.com/*
  32.  
  33. // @exclude *://www.youtube.com/embed/*
  34.  
  35. // @grant none
  36.  
  37. // @run-at document-start
  38.  
  39. // ==/UserScript==
  40.  
  41. var url = window.location.href;
  42.  
  43. if (url.indexOf("disable_polymer") === -1) {
  44.  
  45. if (url.indexOf("?") > 0) {
  46.  
  47. url += "&";
  48.  
  49. } else {
  50.  
  51. url += "?";
  52.  
  53. }
  54.  
  55. url += "disable_polymer=1";
  56.  
  57. window.location.href = url;
  58.  
  59. document.cookie = document.cookie.split(' ').filter(o=>o.indexOf('PREF=')!==-1)[0].replace(';','')+'&f5=30030&f6=8;domain=.youtube.com;path=/';
  60.  
  61. }
  62.  
  63. })();
Advertisement
Add Comment
Please, Sign In to add comment