MozTW 討論區 https://forum.moztw.org/ |
|
Scrollbar Anywhere & Firefox 4 https://forum.moztw.org/viewtopic.php?f=11&t=31670 |
第 1 頁 (共 1 頁) |
發表人: | Merci chao [ 2011-01-14, 13:45 ] |
文章主題 : | Scrollbar Anywhere & Firefox 4 |
如果有裝 Scrollbar Anywhere, 並且是用右鍵來拖放的朋友, 應該知道在 FX4 中有點小 bug... 我等了好像已經半年了, 套件首頁暫時還沒有更新... 因此之前我研究了良久, 寫了一段 userChrome.js 來 "治標" 一下: 代碼: if(location == "chrome://browser/content/browser.xul"){ gBrowser.addEventListener("mousedown", function(event){ if(event.button != 2) return; this.downX = event.screenX; this.downY = event.screenY; document.getElementById("contentAreaContextMenu").hidden = true; }, false); gBrowser.addEventListener("mouseup", function(event){ if(event.button != 2) return; if(this.downX == event.screenX && this.downY == event.screenY) { document.getElementById("contentAreaContextMenu").hidden = false; window.removeEventListener("mousemove", sbawMoveScrollBar, true); } }, false); var functions = ["sbawDownHandler", "sbawUpHandler", "sbawUpHandler"]; var strings = ["e.preventDefault();", "e.stopPropagation();"]; for(var i=0; i<functions.length; i++) for(var j=0; j<strings.length; j++) try { eval(functions[i] + "=" + eval(functions[i]).toString().replace(strings[j], "")); }catch(e){} try { eval("sbawShowContextMenu" + "=" + eval("sbawShowContextMenu").toString() .replace("sbawEnableContextMenu = true;", "sbawEnableContextMenu = true; return;")); }catch(e){} } 希望能幫助遇到同樣問題的朋友 |
發表人: | Firewire [ 2011-01-17, 20:35 ] |
文章主題 : | Re: Scrollbar Anywhere & Firefox 4 |
那个作者很怪,没有 Firefox 的正式版本发布,他是不会放出新版本的。 一旦 Firefox 发布了正式版本,他更新的还不慢。 |
第 1 頁 (共 1 頁) | 所有顯示的時間為 UTC + 8 小時 |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |