flyson
flyso****@users*****
2006年 11月 15日 (水) 21:34:29 JST
Index: bbs2chreader/content/bbs2chreader/statusbar.xml diff -u bbs2chreader/content/bbs2chreader/statusbar.xml:1.3 bbs2chreader/content/bbs2chreader/statusbar.xml:1.3.2.1 --- bbs2chreader/content/bbs2chreader/statusbar.xml:1.3 Wed May 31 22:46:18 2006 +++ bbs2chreader/content/bbs2chreader/statusbar.xml Wed Nov 15 21:34:28 2006 @@ -33,13 +33,18 @@ <method name ="_getCurrentThreadURLSpec"> <body><![CDATA[ + var currentURI = null; try{ - var currentURLSpec = getBrowser().currentURI.spec; + currentURI = getBrowser().currentURI.QueryInterface(Components.interfaces.nsIURL); }catch(ex){ return null; } - if(currentURLSpec.indexOf("bbs2ch:thread:") == -1) return null; - return currentURLSpec.replace(/^bbs2ch:thread:/, ""); + if(currentURI.host != "localhost") return null; + if(currentURI.path.substring(0, 8) != "/thread/") return null; + + dump(currentURI.path.substring(8) +"\n") + + return currentURI.path.substring(8); ]]></body> </method>