- 575 名前:名無しさん@お腹いっぱい。 mailto:sage [2007/09/28(金) 17:19:34 ID:0zl7hUCP0]
- まとめサイトの「2chのURLを踏んだ時にjaneで開く.uc.js」なんですが
Minefield/3.0a8preで動くように出来ないですかね? どの辺が干渉してんのかちょっと判りませんでした。。 function ucjs_link2chbrowser(win){ if(!win) win = window._content; if (win.document.contentType != 'text/html') return; for(var wj=0,lenwj=win.frames.length;wj<lenwj;wj++) ucjs_link2chbrowser(win.frames[wj]); var imenu = win.document.links; var exp = new RegExp("^http:\/\/(ime\.nu|(www\d\.|)ime\.st)\/",""); for(var i=0,len = imenu.length;i<len;i++){ imenu[i].href = imenu[i].href.replace(exp,'http://'); if(imenu[i].href.match(/2ch\.net\//)) imenu[i].onclick = ucjs_launch2ch; } function ucjs_launch2ch(e){ e.preventDefault(); var aURI= e.target.href; var browserPath = "C:\\Program Files\\Jane Style\\Jane2ch.exe" var localFile = Components.classes["@mozilla.org/file/local;1"] .createInstance(Components.interfaces.nsILocalFile); var process = Components.classes["@mozilla.org/process/util;1"] .createInstance(Components.interfaces.nsIProcess); localFile.initWithPath(browserPath); process.init(localFile); process.run(false, [aURI], 1); } } window.addEventListener('load', function(aEvent) { ucjs_link2chbrowser(); }, true);
|

|