CooB
千年狐狸
千年狐狸
  • UID2829
  • 注册日期2005-02-06
  • 最后登录2023-05-23
  • 发帖数2176
  • 经验140枚
  • 威望0点
  • 贡献值18点
  • 好评度3点
  • 社区居民
  • 忠实会员
阅读:2155回复:2

(已解决)求助:发送当前页面链接到IE、CHROME打开

楼主#
更多 发布于:2013-04-17 21:28
如题,扩展是有搜到一个,
https://addons.mozilla.org/en-US/firefo ... src=search
但想用脚本的方式,配合键盘扩展来实现功能,处理当前页面足矣,谢谢。
CooB
千年狐狸
千年狐狸
  • UID2829
  • 注册日期2005-02-06
  • 最后登录2023-05-23
  • 发帖数2176
  • 经验140枚
  • 威望0点
  • 贡献值18点
  • 好评度3点
  • 社区居民
  • 忠实会员
1楼#
发布于:2013-04-17 21:28
Re: 求助:发送当前页面链接到IE、CHROME打开
lonely_8:倒是有FireGestures脚本

FireGestures.generatePopup(event, [ //创建弹出菜单
......
gBrowser._OWAB = function (PATH, args, event) {
	var file = Cc["@mozilla.org/file/local;1"].createInstance(Ci.nsILocalFile);
	file.initWithPath(PATH);
	if (!file.exists()) {
		alert("File does not exist: " + PATH);
		return;
	}
	var process = Cc["@mozilla.org/process/util;1"].createInstance(Ci.nsIProcess);
	try {
		process.init(file);
		var args = args ? args : [];
		if (typeof (event) === "undefined" || event.button == 0) args.push(window.content.location.href);
		else args.push("about:blank"); //防止不同版本间切换后打开新版本页面。
		process.runwAsync(args, args.length, null, false);
	} catch (ex) {
		alert("Failed to execute: " + PATH + "Erro:" + ex);
	}
}
回到原帖


搞定,谢谢脚本!
游客

返回顶部