BulSatCom Fusion Sanitizer

Removes all useless content from BulSatCom Fusion Web IPTV. Enjoy pure blackness and full browser viewing area.

  1. // ==UserScript==
  2. // @name BulSatCom Fusion Sanitizer
  3. // @namespace https://greatest.deepsurf.us/scripts/13328-bulsatcom-fusion-sanitizer/code/BulSatCom%20Fusion%20Sanitizer.user.js
  4. // @version 0.3
  5. // @icon http://www.google.com/s2/favicons?domain=http://www.bulsat.com/
  6. // @description Removes all useless content from BulSatCom Fusion Web IPTV. Enjoy pure blackness and full browser viewing area.
  7. // @author Apostol Apostolov
  8. // @match https://test.iptv.bulsat.com/*
  9. // @grant GM_addStyle
  10. // ==/UserScript==
  11. /* jshint -W097 */
  12. 'use strict';
  13.  
  14. // Removes content blocks unrelated to IPTV watching.
  15.  
  16. function removeContent(element) {
  17. var element;
  18. element = document.getElementById(element);
  19. if (element) {
  20. element.parentNode.removeChild(element);
  21. }
  22. }
  23. removeContent('iptvft');
  24. removeContent('copyright');
  25. removeContent('globalheader');
  26.  
  27. // Injects CSS styles that expand the IPTV UI full screen.
  28. // Customized for 1920x1200 Chrome in Windows. Height takes in account task-bar and Chrome UI.
  29.  
  30. function addGlobalStyle(css) {
  31. var head, style;
  32. head = document.getElementsByTagName('head')[0];
  33. if (!head) { return; }
  34. style = document.createElement('style');
  35. style.type = 'text/css';
  36. style.innerHTML = css;
  37. head.appendChild(style);
  38. }
  39. addGlobalStyle('body { margin-left: -12px; }');
  40. addGlobalStyle('html { background: #000000 url() repeat-x top;}');
  41. addGlobalStyle('#main { width: 1900px; !important; padding-left: 0px !important; }');
  42. addGlobalStyle('#main, #globalheader, #globalfooter { width: 1900px; !important; }');
  43. addGlobalStyle('#iptv #iptvpc { background: url() no-repeat; height: 300px; padding-top: 75px !important; background-color: #191c1f; }');
  44. addGlobalStyle('#iptv #iptvpc h3 { display:none }');
  45. addGlobalStyle('#iptv #iptvpc #wrapper { width: 1920px !important; height: 150% !important; margin-left: 0px !important }');
  46. addGlobalStyle('#iptv #iptvpc #wrapper #pl { background-color: #191c1f !important; }');
  47. addGlobalStyle('#iptv #iptvpc #wrapper #pl #jw_wrapper { width: 1620px !important; height: 870px !important; margin-top: -75px !important; }');
  48. addGlobalStyle('#iptv #iptvpc #wrapper #epg { width: 100% !important; }');
  49. addGlobalStyle('#epg ul { float: left !important; }');
  50. addGlobalStyle('#iptv #iptvpc #wrapper #list { height: 869px !important; margin-top: -75px; width: 299px !important;}');
  51. addGlobalStyle('#grp { width: 1920px !important; }');
  52. addGlobalStyle('#grp span { width: 12.45% !important; }');
  53. addGlobalStyle('#cfg input[type="button"] { display:none }');
  54.  
  55. // JavaScript snippet to check if vertical or horisontal scrollbars are displayed due to window resize, and hides them.
  56.  
  57. (function() {var css = "body {overflow-y: hidden !important;}";
  58. if (typeof GM_addStyle != "undefined") {
  59. GM_addStyle(css);
  60. } else if (typeof PRO_addStyle != "undefined") {
  61. PRO_addStyle(css);
  62. } else if (typeof addStyle != "undefined") {
  63. addStyle(css);
  64. } else {
  65. var node = document.createElement("style");
  66. node.type = "text/css";
  67. node.appendChild(document.createTextNode(css));
  68. var heads = document.getElementsByTagName("head");
  69. if (heads.length > 0) {
  70. heads[0].appendChild(node);
  71. } else {
  72. // no head yet, stick it whereever
  73. document.documentElement.appendChild(node);
  74. }
  75. }
  76. })();