firefox userChrome.js greasemonkeyスクリプトスレ
■ このスレッドは過去ログ倉庫に格納されています
0051名無しさん@お腹いっぱい。
2007/02/22(木) 18:53:42ID:VxrGsPbw0(function() {
var m = document.getElementById("contentAreaContextMenu").appendChild(document.createElement("menuitem"));
m.setAttribute("label", "IE");
m.setAttribute("oncommand", "ucjs_openIE();");
})();
function ucjs_openIE() {
const IE_PATH = "C:\\Program Files\\Internet Explorer\\iexplore.exe";
var args = new Array();
args.push(window._content.location.href);
var application = Components.classes["@mozilla.org/file/local;1"].createInstance(Components.interfaces.nsILocalFile);
application.initWithPath(IE_PATH);
if (!application.exists()) alert("error: application doesn't exist\n" + IE_PATH);
var process = Components.classes["@mozilla.org/process/util;1"].createInstance(Components.interfaces.nsIProcess);
process.init(application);
process.run(false, args, args.length);
}
■ このスレッドは過去ログ倉庫に格納されています