ubuntu下 firegestures 如何调用 chrome
firefox吧
全部回复
仅看楼主
level 10
如题,windows下的写法是这样:
const Chrome_PATH = "C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe";
var file = Cc["@mozilla.org/file/local;1"].createInstance(Ci.nsILocalFile);
file.initWithPath(Chrome_PATH);
if (!file.exists()) {
alert("File does not exist: " + Chrome_PATH);
return;
}
var process = Cc["@mozilla.org/process/util;1"].createInstance(Ci.nsIProcess);
try {
var args = [window.content.location.href];
process.init(file);
process.run(false, args, args.length);
}
catch (ex) {
alert("Failed to execute: " + Chrome_PATH);
}
不知在ubuntu下可有解法?
2014年01月08日 16点01分 1
level 13
[委屈]不明帮顶
2014年01月08日 16点01分 2
吧务
level 15
不知
2014年01月08日 16点01分 3
level 10
发现第一行改为
const Chrome_PATH = "/opt/google/chrome/google-chrome";
即可。
firefox is great!
发现一个扩展
Open In Chrome
https://addons.mozilla.org/zh-CN/firefox/addon/open-in-chrome/
2014年01月12日 15点01分 4
1