Greasy Fork 支持简体中文。

Enable Vertical and Horizontal Scrollbar Everywhere

Enable vertical and horizontal page BODY scrolling (for example, where it is disabled if a modal is open).

目前為 2019-02-12 提交的版本,檢視 最新版本

  1. // ==UserScript==
  2. // @name Enable Vertical and Horizontal Scrollbar Everywhere
  3. // @namespace RW5hYmxlIFZlcnRpY2FsIGFuZCBIb3Jpem9udGFsIFNjcm9sbGJhciBFdmVyeXdoZXJl
  4. // @description Enable vertical and horizontal page BODY scrolling (for example, where it is disabled if a modal is open).
  5. // @author smed79
  6. // @version 1.0
  7. // @encoding utf-8
  8. // @license https://creativecommons.org/licenses/by-nc-sa/4.0/
  9. // @icon https://vgy.me/R02voT.png
  10. // @match http://*/*
  11. // @match https://*/*
  12. // @grant GM_addStyle
  13. // ==/UserScript==
  14.  
  15. function addGlobalStyle(css) {
  16. var head, style;
  17. head = document.getElementsByTagName('head')[0];
  18. if (!head) {
  19. return;
  20. }
  21. style = document.createElement('style');
  22. style.type = 'text/css';
  23. style.innerHTML = css;
  24. head.appendChild(style);
  25. }
  26.  
  27. addGlobalStyle('html { overflow-y: auto !important; }');
  28. addGlobalStyle('body { overflow-y: auto !important; }');