あらゆるリンクから自動的にタブを開く場合に、Ctrl(またはCommand)キーが
押されているときは動作を反転するようにした git-svn-id: http://www.cozmixng.org/repos/piro/treestyletab/trunk@1382 599a83e7-65a4-db11-8015-0010dcdd6dc2
This commit is contained in:
parent
5a83f42abe
commit
8f2c937a57
@ -898,10 +898,25 @@ catch(e) {
|
||||
!event || !($1) ||
|
||||
!TreeStyleTabService.getTreePref('link.invertDefaultBehavior') ||
|
||||
(
|
||||
TreeStyleTabService.checkToOpenChildTab(TreeStyleTabService.browser) &&
|
||||
(TreeStyleTabService.stopToOpenChildTab(TreeStyleTabService.browser), false)
|
||||
)
|
||||
TreeStyleTabService.readyToOpenChildTab(TreeStyleTabService.browser),
|
||||
false
|
||||
)
|
||||
) // don't cancel child tab at this point, because I reuse the flag to load link after this block.
|
||||
]]></>
|
||||
).replace(
|
||||
'return false;case 1:',
|
||||
<><![CDATA[
|
||||
// cancel child tab at this point and load link to imitate default link behavior.
|
||||
if (TreeStyleTabService.checkToOpenChildTab(TreeStyleTabService.browser)) {
|
||||
TreeStyleTabService.stopToOpenChildTab(TreeStyleTabService.browser);
|
||||
urlSecurityCheck(href, linkNode.ownerDocument.location.href);
|
||||
var postData = {};
|
||||
href = getShortcutOrURI(href, postData);
|
||||
if (!href) return false;
|
||||
loadURI(href, null, postData.value, false);
|
||||
}
|
||||
return false;
|
||||
case 1:
|
||||
]]></>
|
||||
)
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user