Advertisement
Guest User

Youtube Cinema Size Enlarger

a guest
Apr 18th, 2012
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.07 KB | None | 0 0
  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>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement