Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Youtube Cinema Size Enlarger

By: a guest on Apr 18th, 2012  |  syntax: None  |  size: 1.07 KB  |  views: 69  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. <textarea cols="50" rows="5">
  2. // ==UserScript==
  3. // @name           Youtube Cinema Size Enlarger
  4. // @namespace      http://userscripts.org
  5. // @description    Autoscrolls Youtube player to top and resize the video to a nice and
  6. //comfortable size.
  7. // @include       http://*.youtube.*/*
  8. // @include       http://youtube.*/*
  9. // @include       https://*.youtube.*/*
  10. // @include       https://youtube.*/*
  11. // ==/UserScript==
  12. var player=$("watch-player");
  13.  
  14. function fitToWindow() {
  15.         player.style.marginLeft = (window.innerWidth >= 960 ? (985 - window.innerWidth) / 2 :
  16.  
  17. "0") + "px";
  18.         player.style.width = (window.innerWidth-30) + "px";
  19.         player.style.height = (window.innerHeight-50) + "px";
  20.         $("watch-sidebar").style.marginTop = "1px";
  21.  
  22.         window.setTimeout(fitToWindow, 500);
  23.  
  24. }
  25.  
  26. function $(A) {
  27.         return document.getElementById(A);
  28. }
  29. $("watch-headline-title").scrollIntoView(true);
  30. // old scroll $("watch-video-container").scrollIntoView(true);
  31.                        
  32. fitToWindow();
  33. GM_addStyle(".watch-wide-mode, #watch-player, #watch-player {padding-left:3px!important}");
  34. </textarea>