阅读:2446回复:3
那个点鼠标右键一刷可以打开无数链接的扩展叫什么来着?
忘记了。那个威力很猛的。咵一下可以出来无数的新的标签页。很强大的。
|
|
1楼#
发布于:2008-04-10 14:41
是不是snap links
|
|
|
2楼#
发布于:2008-04-10 14:41
鼠标手势扩展都行,你说的估计是Firegestures
AIOg和MG默认的是右键刷过后“右上左”打开 |
|
|
3楼#
发布于:2008-04-10 14:41
装userchrome.js,下面是我在用的鼠标手势,想怎么搞自己设置,我自己定义的是右键划过链接后台打开标签.
({ GESTURES: { // "<gesture>": ["<gesture name>", "<command id or JavaScript code>"], "D": ["Duplicate Tab", 'gBrowser.selectedTab = gBrowser.moveTabTo(gBrowser. duplicateTab(gBrowser.selectedTab), gBrowser.selectedTab._tPos + 1);'], "DL": ["Minimize Window", 'window.minimize();'], "R": ["Close Tab Or Window", "cmd_close"], "": ["Back", "Browser:Back"], "LD": ["Stop Loading Page", "Browser:Stop"], "LR": ["Undo Close Tab", "History:UndoCloseTab"], "": ["Forward", "Browser:Forward"], "RDUR": ["Translate To English", 'content.location = "http://translate.google.com/translate?u=" + content.location;'], "": ["Scroll To Top", 'goDoCommand("cmd_scrollTop");'], "UD": ["Reload Frame", 'this._origDoc.location.reload();'], "L": ["Reload Page (Skipping Cache)", "Browser:ReloadSkipCache"], "UL": ["Select Previous Tab", 'gBrowser.tabContainer.advanceSelectedTab(-1, true);'], "UR": ["Select Next Tab", 'gBrowser.tabContainer.advanceSelectedTab(+1, true);'], "U": ["Open Links In Background", 'this._links.forEach(function(aURL) { gBrowser.addTab(aURL, gBrowser.currentURI); });'], "D": ["Open new Tab","cmd_newNavigatorTab"], // regular expression mappings for all gestures containing a wildcard * "*": { "*UR": /UR$/ } }, init: function() { var self = this; function registerEvents(aAction) { ["mousedown", "mousemove", "mouseup", "contextmenu"].forEach(function(aType) { getBrowser().mPanelContainer[aAction + "EventListener"](aType, self, aType == "contextmenu"); }); } registerEvents("add"); window.addEventListener("unload", function() { registerEvents("remove"); }, false); }, handleEvent: function(aEvent) { switch (aEvent.type) { case "mousedown": if (aEvent.button == 2) { this._isMouseDown = true; this.startGesture(aEvent); } break; case "mousemove": if (this._isMouseDown) { this.progressGesture(aEvent); } break; case "mouseup": if (this._isMouseDown) { this._isMouseDown = false; this._suppressContext = !!this._gesture; this.stopGesture(aEvent); if (this._shouldFireContext) // for Linux and Mac { this._shouldFireContext = false; var event = aEvent.originalTarget.ownerDocument.createEvent("MouseEvents"); event.initMouseEvent("contextmenu", true, true, aEvent.originalTarget.defaultView, 0, aEvent.screenX, aEvent.screenY, aEvent.clientX, aEvent.clientY, false, false, false, false, 2, null); aEvent.originalTarget.dispatchEvent(event); } } break; case "contextmenu": if (this._suppressContext || this._isMouseDown) { this._suppressContext = false; this._shouldFireContext = this._isMouseDown; aEvent.preventDefault(); aEvent.stopPropagation(); } break; } }, startGesture: function(aEvent) { this._gesture = ""; this._x = aEvent.screenX; this._y = aEvent.screenY; this._origDoc = aEvent.originalTarget.ownerDocument; this._links = []; }, progressGesture: function(aEvent) { if (!this._origDoc) { return; } for (var node = aEvent.originalTarget; node; node = node.parentNode) { if (node instanceof Components.interfaces.nsIDOMHTMLAnchorElement) { if (this._links.indexOf(node.href) == -1) { this._links.push(node.href); } break; } } this.timeGesture(); var x = aEvent.screenX, y = aEvent.screenY; var distX = Math.abs(x - this._x), distY = Math.abs(y - this._y); var threshold = 15 / (gBrowser.selectedBrowser.markupDocumentViewer.fullZoom || 1.0); if (distX < threshold && distY < threshold) { return; } var dir = distX > distY ? (x < this._x ? "L" : "R") : (y < this._y ? "U" : "D"); if (dir != this._gesture.slice(-1)) { this._gesture += dir; content.status = "Gesture: " + this._gesture + (this.GESTURES[this._gesture] ? " (" + this.GESTURES[this._gesture][0] + ")" : ""); } this._x = x; this._y = y; }, timeGesture: function(aClearing) { if (this._timer) { clearTimeout(this._timer); } this._timer = setTimeout(!aClearing ? function(aSelf) { aSelf.stopGesture({}, true); } : function(aSelf) { aSelf._timer = content.status = ""; }, 1500, this); }, stopGesture: function(aEvent, aCancel) { if (this._origDoc && this._gesture) { try { if (aCancel) { throw "Gesture canceled"; } var cmd = this.GESTURES[this._gesture] || null; if (!cmd) { for (var key in this.GESTURES["*"]) { if (this.GESTURES["*"][key].test(this._gesture)) { cmd = this.GESTURES[key]; break; } } } if (!cmd) { throw "Unknown Gesture: " + this._gesture; } content.status = "Gesture: " + cmd[0]; if (document.getElementById(cmd[1])) { document.getElementById(cmd[1]).doCommand(); } else { eval(cmd[1]); } } catch (ex) { content.status = ex; } this.timeGesture(true); } this._origDoc = this._links = null; } }).init(); |
|