livestream.com Widescreen tweak

Expand the video on livestream.com while keeping the chat visible

  1. // ==UserScript==
  2. // @name livestream.com Widescreen tweak
  3. // @description Expand the video on livestream.com while keeping the chat visible
  4. // @icon https://lh4.googleusercontent.com/-HR473IkG4L8/AAAAAAAAAAI/AAAAAAAAE2E/tgp7xxNk6dI/s46-c-k-no/photo.jpg
  5. // @version 0.3.2
  6. // @license GNU General Public License v3
  7. // @copyright 2014, Nickel
  8. // @grant GM_addStyle
  9. // @include *://www.livestream.com/*
  10. // @namespace https://greasyfork.org/users/10797
  11. // ==/UserScript==
  12.  
  13. (function(){
  14.  
  15. // don't run in frames
  16. if (frameElement){ return; }
  17.  
  18. // fallback (Chrome lacks GM functions)
  19. if( typeof GM_addStyle != 'function' ) {
  20. function GM_addStyle(css) {
  21. var head, style;
  22. head = document.getElementsByTagName('head')[0];
  23. if( !head ){ return; }
  24. style = document.createElement('style');
  25. style.type = 'text/css';
  26. style.innerHTML = css;
  27. head.appendChild(style);
  28. }
  29. }
  30.  
  31. // expand
  32. document.getElementById("content").classList.add("expanded");
  33. document.getElementById("expand-channel-player").classList.add("expanded");
  34.  
  35. // fix widths
  36. GM_addStyle("#main {width:1280px !important;}");
  37.  
  38. GM_addStyle("#main-top {width:1310px !important;}");
  39. GM_addStyle("#top-header {width:1280px !important;}");
  40.  
  41. GM_addStyle("#main-bottom {width:1310px !important;}");
  42. GM_addStyle("#top-bottom {width:1280px !important;}");
  43. GM_addStyle("#footer-main-bottom {width:1280px !important;}");
  44.  
  45. GM_addStyle("#main .box-wrap:not(#channel-chat):not(#like):not(#adContainer):not(#related-channels) {width:912px !important;}");
  46. GM_addStyle("#main #channel-about .content {width:720px !important;}");
  47. GM_addStyle("#main .box .footer {width:910px !important;}");
  48.  
  49. })();