08/12/02 12:08:42 xW4PlCeJ0
>>664
FireGestures用のを。
URLリンク(www.xuldev.org)
ここにある「ページを Internet Explorer で開く」をいじってリンクにも対応させた。
これはIE用だから、最初のC:\\~をJane styleのパスに書き換えてね。
const IE_PATH = "C:\\Program Files\\Internet Explorer\\iexplore.exe";
var file = Cc["@mozilla.org/file/local;1"].createInstance(Ci.nsILocalFile);
file.initWithPath(IE_PATH);
if (!file.exists()) {
alert("File does not exist: " + IE_PATH);
return;
}
var process = Cc["@mozilla.org/process/util;1"].createInstance(Ci.nsIProcess);
try {
var args = [window.content.location.href];
var linkURL = FireGestures.getLinkURL();
if (linkURL) args = [linkURL];
process.init(file);
process.run(false, args, args.length);
}
catch (ex) {
alert("Failed to execute: " + IE_PATH);
}