- 295 名前:名無しさん@お腹いっぱい。 mailto:sage [2009/04/07(火) 05:31:43 ID:NV5Kljh00]
- //同一ホストのタブを閉じる
{ var uri = gBrowser.currentURI; var hostA, hostB; try { hostA = uri.host; } catch(e) { hostA = null; } if (!hostA) return; var tabs = Array.slice(gBrowser.mTabs); tabs.reverse(); Array.forEach(tabs, function (tab) { if (!tab.linkedBrowser.docShell.busyFlags && !tab.linkedBrowser.docShell.restoringDocument) { try { hostB = gBrowser.getBrowserForTab(tab).currentURI.host; } catch(e) { hostB = null; } if (hostA == hostB) { gBrowser.removeTab(tab); } } }); } break;
|

|