Scroll Bar Enabler

Re-enables the scroll bar for sites that use anti-adblock scripts.

  1. // ==UserScript==
  2. // @name Scroll Bar Enabler
  3. // @namespace https://greasyfork.org/users/313414
  4. // @version 1.1
  5. // @description Re-enables the scroll bar for sites that use anti-adblock scripts.
  6. // @author Matt-RJ
  7. // @match *://*/*
  8. // @grant unsafeWindow
  9. // @grant GM_registerMenuCommand
  10. // ==/UserScript==
  11.  
  12. (function() {
  13. 'use strict';
  14.  
  15. /*
  16. Whether the script runs automatically on every page.
  17. If set to false, use the extension button -> enable scrolling to run manually.
  18. */
  19. var automaticallyEnable = true;
  20.  
  21. /*
  22. Some sites disable scrolling after the page has loaded. enableDelay is how long, in ms,
  23. before the script runs automatically to enable scrolling again.
  24. */
  25. var automaticEnableDelay = 500;
  26.  
  27. if (automaticallyEnable) {
  28. setTimeout(function() {
  29. enableScrolling();
  30. }, automaticEnableDelay);
  31. }
  32.  
  33. GM_registerMenuCommand("Enable Scrolling", function() {
  34. enableScrolling();
  35. }, 'r');
  36.  
  37. function enableScrolling() {
  38. var body = document.getElementsByTagName("BODY")[0];
  39. body.style.overflow = "visible";
  40. }
  41.  
  42. })();