andypku
非常火狐
非常火狐
  • UID23097
  • 注册日期2008-03-05
  • 最后登录2022-08-20
  • 发帖数865
  • 经验740枚
  • 威望0点
  • 贡献值790点
  • 好评度26点
  • 社区居民
  • 忠实会员
阅读:2446回复:3

那个点鼠标右键一刷可以打开无数链接的扩展叫什么来着?

楼主#
更多 发布于:2008-04-10 14:41
忘记了。那个威力很猛的。咵一下可以出来无数的新的标签页。很强大的。
dangerboy_dx
非常火狐
非常火狐
  • UID9755
  • 注册日期2005-11-12
  • 最后登录2025-06-14
  • 发帖数977
  • 经验117枚
  • 威望0点
  • 贡献值86点
  • 好评度7点
  • 社区居民
  • 忠实会员
1楼#
发布于:2008-04-10 14:41
是不是snap links
kmc
kmc
管理员
管理员
  • UID165
  • 注册日期2004-11-25
  • 最后登录2024-08-29
  • 发帖数9187
  • 经验398枚
  • 威望1点
  • 贡献值124点
  • 好评度41点
  • 忠实会员
  • 终身成就
  • 社区居民
2楼#
发布于:2008-04-10 14:41
鼠标手势扩展都行,你说的估计是Firegestures
AIOg和MG默认的是右键刷过后“右上左”打开
Waterfox Current和Firefox Nightly都用,逐渐走出XUL扩展依赖
不带口罩
火狐狸
火狐狸
  • UID22190
  • 注册日期2007-12-07
  • 最后登录2016-08-15
  • 发帖数189
  • 经验10枚
  • 威望0点
  • 贡献值0点
  • 好评度0点
  • 社区居民
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();
游客

返回顶部