linee
小狐狸
小狐狸
  • UID5884
  • 注册日期2005-05-11
  • 最后登录2024-04-26
  • 发帖数90
  • 经验29枚
  • 威望0点
  • 贡献值12点
  • 好评度0点
  • 社区居民
  • 忠实会员
阅读:529回复:0

[求助] FloatingScrollbar 升级 115 后失效了, 求修改.

楼主#
更多 发布于:2023-08-07 14:38
// ==UserScript==
// @name         FloatingScrollbar
// @description  ReStyle Scrollbar
// @namespace    1018148046
// @include      main
// @version      0.1
// @charset      UTF-8
// ==/UserScript==
(function() {
    let css = `
scrollbar{ -moz-appearance:none!important;background:none!important;position:relative!important;padding:unset!important;pointer-events: auto!important;}
scrollbar thumb{-moz-appearance:none!important;background-color:rgba(0, 0, 0, 0.2)!important;margin: unset!important;border:none!important;}
scrollbar:hover thumb,scrollbar thumb:hover{background-color:#9b9b9b !important;}
scrollbar thumb:active{background-color:#9b9b9b !important;}
/* Vertical ScrollBar*/
scrollbar[orient="vertical"]{min-width:8px!important;max-width: 8px!important;min-height:20px!important;margin-left: -8px!important; z-index: 1000;}
scrollbar thumb[orient="vertical"]{min-height:50px!important;border-radius: 5px!important;}
/* Horizontal ScrollBar*/
scrollbar[orient="horizontal"]{min-height:8px!important;max-height:8px!important;min-width:20px!important;margin-top: -8px!important; z-index: 1000;}
scrollbar thumb[orient="horizontal"]{min-width:50px!important;border-radius: 5px!important;}
/* ScrollBar Button*/
scrollbar scrollcorner,scrollbar scrollbarbutton{display:none!important;}
`;
    let sss = Cc['@mozilla.org/content/style-sheet-service;1'].getService(Ci.nsIStyleSheetService);
    let uri = makeURI('data:text/css;charset=UTF=8,' + encodeURIComponent(css));
    sss.loadAndRegisterSheet(uri, sss.AGENT_SHEET);   
})();
游客

返回顶部