阅读:2375回复:4
【已解决】求修复FF67【蓝色悬浮滚动条.uc.js】
在60有效,在67无效,下面代码为 【蓝色悬浮滚动条.uc.js】,谢谢!
解决方案在2楼,感谢RunningCheese // ==UserScript== // @name FloatingScrollbar.uc.js // @namespace nightson1988@gmail.com // @include main // @version v2018-05-15 修改在微信网页版上的错误 // @version 0.0.3 // @note Thanks to Griever(https://github.com/Griever/userChromeJS/blob/master/SmartScrollbar.uc.js) and Paul Rouget(https://gist.github.com/4003205) // @note...........0.0.3 Fixed a problem of breaking hbox layout // @note 0.0.2 Remove usage of E4X (https://bugzilla.mozilla.org/show_bug.cgi?id=788293) // ==/UserScript== (function () { var prefs = Services.prefs, enabled; if (prefs.prefHasUserValue('userChromeJS.floating_scrollbar.enabled')) { enabled = prefs.getBoolPref('userChromeJS.floating_scrollbar.enabled') } else { prefs.setBoolPref('userChromeJS.floating_scrollbar.enabled', true); enabled = true; } // 排除微信网页版 var css = '\ @namespace url(http: //www.mozilla.org/keymaster/gatekeeper/there.is.only.xul);\ @-moz-document regexp("^((?!wx2.qq.com).)*$") {\ :not(select):not(hbox) > scrollbar {\ -moz-appearance: none!important;\ position: relative;\ background-color: transparent;\ background-image: none;\ z-index: 2147483647;\ padding: 0px;\ }\ :not(select):not(hbox) > scrollbar[orient = "vertical"] {\ -moz-margin-start: 0px;\ min-width: 8px;\ }\ :not(select):not(hbox) > scrollbar[orient = "vertical"] thumb {\ min-height: 60px;\ }\ :not(select):not(hbox) > scrollbar[orient = "horizontal"] {\ margin-top: -13px;\ min-height: 13px;\ }\ :not(select):not(hbox) > scrollbar[orient = "horizontal"] thumb {\ min-width: 60px;\ }\ :not(select):not(hbox) > scrollbar thumb {\ -moz-appearance: none!important;\ border-width: 0px!important;\ border-radius: 5px!important;\ background-color: rgba(0, 133, 234, 0.4)!important;\ }\ :not(select):not(hbox) > scrollbar thumb:active,\ :not(select):not(hbox) > scrollbar thumb:hover {\ background-color: #0085ea!important;\ }\ :not(select):not(hbox) > scrollbar scrollbarbutton, :not(select):not(hbox) > scrollbar gripper {\ display: none;}\ }'; var sss = Cc['@mozilla.org/content/style-sheet-service;1'].getService(Ci.nsIStyleSheetService); var uri = makeURI('data:text/css;charset=UTF=8,' + encodeURIComponent(css)); var p = document.getElementById('devToolsSeparator'); var m = document.createElement('menuitem'); m.setAttribute('label', "Use Floating Scrollbar"); m.setAttribute('type', 'checkbox'); m.setAttribute('autocheck', 'false'); m.setAttribute('checked', enabled); p.parentNode.insertBefore(m, p); m.addEventListener('command', command, false); if (enabled) { sss.loadAndRegisterSheet(uri, sss.AGENT_SHEET); } function command() { if (sss.sheetRegistered(uri, sss.AGENT_SHEET)) { prefs.setBoolPref('userChromeJS.floating_scrollbar.enabled', false); sss.unregisterSheet(uri, sss.AGENT_SHEET); m.setAttribute('checked', false); } else { prefs.setBoolPref('userChromeJS.floating_scrollbar.enabled', true); sss.loadAndRegisterSheet(uri, sss.AGENT_SHEET); m.setAttribute('checked', true); } let root = document.documentElement; let display = root.style.display; root.style.display = 'none'; window.getComputedStyle(root).display; // Flush root.style.display = display; } })(); |
|
最新喜欢:![]() |
1楼#
发布于:2019-05-26 12:19
现已解决: 方案来自卡饭RunningCheese Firefox V10,感谢!
// ==UserScript== // @name FloatingScrollbar // @description ReStyle Scrollbar // @namespace 1018148046 // @include chrome://browser/content/browser.xul // @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, 133, 234, 0.5)!important;margin: unset!important;border:none!important;} scrollbar:hover thumb,scrollbar thumb:hover{background-color:#0085ea !important;} scrollbar thumb:active{background-color:#0085ea !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); })(); |
|
2楼#
发布于:2019-05-26 13:01
发现老版本的RunningCheeseFirefox也能用 而且能在addon管理页面(非最大化窗口)正常使用
// ==UserScript== // @name FloatingScrollbar.uc.js // @namespace nightson1988@gmail.com // @include main // @version 0.0.3 // @note Thanks to Griever(https://github.com/Griever/userChromeJS/blob/master/SmartScrollbar.uc.js) and Paul Rouget(https://gist.github.com/4003205) // @note...........0.0.3 Fixed a problem of breaking hbox layout // @note 0.0.2 Remove usage of E4X (https://bugzilla.mozilla.org/show_bug.cgi?id=788293) // ==/UserScript== (function () { var prefs = Services.prefs, enabled; if (prefs.prefHasUserValue('userChromeJS.floating_scrollbar.enabled')) { enabled = prefs.getBoolPref('userChromeJS.floating_scrollbar.enabled') } else { prefs.setBoolPref('userChromeJS.floating_scrollbar.enabled', true); enabled = true; } var css = '\ @namespace url(http: //www.mozilla.org/keymaster/gatekeeper/there.is.only.xul);\ :not(select):not(hbox) > scrollbar {\ -moz-appearance: none!important;\ position: relative;\ background-color: transparent;\ background-image: none;\ z-index: 2147483647;\ padding: 0px;\ }\ :not(select):not(hbox) > scrollbar[orient = "vertical"] {\ -moz-margin-start: -11px;\ min-width: 11px;\ }\ :not(select):not(hbox) > scrollbar[orient = "vertical"] thumb {\ min-height: 50px;\ }\ :not(select):not(hbox) > scrollbar[orient = "horizontal"] {\ margin-top: -11px;\ min-height: 11px;\ }\ :not(select):not(hbox) > scrollbar[orient = "horizontal"] thumb {\ min-width: 50px;\ }\ :not(select):not(hbox) > scrollbar thumb {\ -moz-appearance: none!important;\ border-width: 0px!important;\ border-radius: 3px!important;\ background-color: rgba(0, 133, 234, 0.1)!important;\ }\ :not(select):not(hbox) > scrollbar thumb:active,\ :not(select):not(hbox) > scrollbar thumb:hover {\ background-color: rgba(4, 172, 218, 0.8)!important;\ }\ :not(select):not(hbox) > scrollbar scrollbarbutton, :not(select):not(hbox) > scrollbar gripper {\ display: none;\ }'; var sss = Cc['@mozilla.org/content/style-sheet-service;1'].getService(Ci.nsIStyleSheetService); var uri = makeURI('data:text/css;charset=UTF=8,' + encodeURIComponent(css)); var p = document.getElementById('devToolsSeparator'); var m = document.createElement('menuitem'); m.setAttribute('label', "Schwebende Scrollbar"); m.setAttribute('type', 'checkbox'); m.setAttribute('autocheck', 'false'); m.setAttribute('checked', enabled); p.parentNode.insertBefore(m, p); m.addEventListener('command', command, false); if (enabled) { sss.loadAndRegisterSheet(uri, sss.AGENT_SHEET); } function command() { if (sss.sheetRegistered(uri, sss.AGENT_SHEET)) { prefs.setBoolPref('userChromeJS.floating_scrollbar.enabled', false); sss.unregisterSheet(uri, sss.AGENT_SHEET); m.setAttribute('checked', false); } else { prefs.setBoolPref('userChromeJS.floating_scrollbar.enabled', true); sss.loadAndRegisterSheet(uri, sss.AGENT_SHEET); m.setAttribute('checked', true); } let root = document.documentElement; let display = root.style.display; root.style.display = 'none'; window.getComputedStyle(root).display; // Flush root.style.display = display; } })(); |
|
3楼#
发布于:2019-06-17 21:52
|
|
4楼#
发布于:2019-06-18 00:51
wenshanliren:用的也是RC的脚本,但是滚动条的粗细定义无效,67有这个问题回到原帖 ![]() |
|