Advertisement
Guest User

Youtube fix

a guest
Dec 7th, 2012
185
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // ==UserScript==
  2. // @name           YouTube Fix
  3. // @description    Fixes youtube stupid design choice
  4. // @include        http://*.youtube.com/watch*
  5. // @include        http://youtube.com/watch*
  6. // @include        https://*.youtube.com/watch*
  7. // @include        https://youtube.com/watch*
  8. // @version        1.0
  9. // ==/UserScript==
  10.  
  11. var script = document.createElement('script');
  12. script.setAttribute('type', 'text/javascript');
  13. script.textContent += [
  14.     function resizePlayer() {
  15.         videoDiv = document.getElementById('watch7-player');
  16.         videoDiv.setAttribute('style', 'width: 1280px !important; height: 750px !important;');
  17.         videoDiv2 = document.getElementById('watch7-video');
  18.         videoDiv2.setAttribute('style', 'left:0px !important; width: 1280px !important; height: 750px !important;');
  19.         leftDiv = document.getElementById('guide');
  20.         leftDiv.setAttribute('style', 'display: none !important;');
  21.         videoCont = document.getElementById('watch7-video-container');
  22.         videoCont.setAttribute('style', 'background-color: #2b2b2b !important;padding-top:0px !important;');
  23.         Content = document.getElementById('watch7-main');
  24.         Content.setAttribute('style', 'width:1280px !important; left:0px !important;');
  25.         Content2 = document.getElementById('watch7-content');
  26.         Content2.setAttribute('style', 'width:1095px !important; left:0px !important;');
  27.        
  28.        
  29.        
  30.         document.body.className = document.body.className.replace('site-left-align','site-center-align');
  31.     }
  32.    
  33.    
  34. ].join('\n');
  35. script.textContent += "resizePlayer();\n";
  36. var body = document.getElementsByTagName('body')[0];
  37. body.appendChild(script);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement