現在のページがabout:blankなどの時にエラーになる問題を修正
git-svn-id: http://www.cozmixng.org/repos/piro/treestyletab/trunk@1350 599a83e7-65a4-db11-8015-0010dcdd6dc2
This commit is contained in:
parent
2508116bc3
commit
381207f5b5
@ -760,8 +760,11 @@ catch(e) {
|
|||||||
'{',
|
'{',
|
||||||
<><![CDATA[
|
<><![CDATA[
|
||||||
{
|
{
|
||||||
var currentURI = TreeStyleTabService.browser.currentURI;
|
var currentURI = TreeStyleTabService.browser.currentURI;
|
||||||
var parentTab = TreeStyleTabService.getParentTab(TreeStyleTabService.browser.selectedTab);
|
var currentHost = currentURI.spec.match(/^\w+:\/\/[^:\/]+(\/|$)/) ? currentURI.host : null ;
|
||||||
|
var parentTab = TreeStyleTabService.getParentTab(TreeStyleTabService.browser.selectedTab);
|
||||||
|
var parentURI = parentTab ? parentTab.linkedBrowser.currentURI : null ;
|
||||||
|
var parentHost = parentURI && parentURI.spec.match(/^\w+:\/\/[^:\/]+(\/|$)/) ? parentURI.host : null ;
|
||||||
]]></>
|
]]></>
|
||||||
).replace(
|
).replace(
|
||||||
'aTriggeringEvent && aTriggeringEvent.altKey',
|
'aTriggeringEvent && aTriggeringEvent.altKey',
|
||||||
@ -772,16 +775,17 @@ catch(e) {
|
|||||||
(
|
(
|
||||||
(
|
(
|
||||||
TreeStyleTabService.getTreePref('urlbar.loadSameDomainToNewChildTab') &&
|
TreeStyleTabService.getTreePref('urlbar.loadSameDomainToNewChildTab') &&
|
||||||
currentURI.host == RegExp.$1 &&
|
currentHost == RegExp.$1 &&
|
||||||
(TreeStyleTabService.readyToOpenChildTab(
|
(TreeStyleTabService.readyToOpenChildTab(
|
||||||
parentTab && parentTab.linkedBrowser.currentURI.host == RegExp.$1 ?
|
parentHost == RegExp.$1 ?
|
||||||
parentTab :
|
parentTab :
|
||||||
null
|
null
|
||||||
), true)
|
), true)
|
||||||
) ||
|
) ||
|
||||||
(
|
(
|
||||||
TreeStyleTabService.getTreePref('urlbar.loadSameDomainToNewChildTab') &&
|
TreeStyleTabService.getTreePref('urlbar.loadSameDomainToNewChildTab') &&
|
||||||
currentURI.host != RegExp.$1
|
currentHost != RegExp.$1 &&
|
||||||
|
currentURI.spec != 'about:blank'
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user