pref UI for middle click on the new tab button should be hidden on Firefox 3.6
This commit is contained in:
parent
e5e96b92da
commit
7c71359f2d
@ -162,6 +162,12 @@ function initTabPane()
|
|||||||
'openGroupBookmark-check',
|
'openGroupBookmark-check',
|
||||||
'openGroupBookmark-deck'
|
'openGroupBookmark-deck'
|
||||||
);
|
);
|
||||||
|
|
||||||
|
var newTabPref = document.getElementById('extensions.treestyletab.autoAttach.newTabButton-box');
|
||||||
|
if (comparator.compare(XULAppInfo.version, '4.0') >= 0)
|
||||||
|
newTabPref.removeAttribute('hidden');
|
||||||
|
else
|
||||||
|
newTabPref.setAttribute('hidden', true);
|
||||||
}
|
}
|
||||||
|
|
||||||
function onSyncGroupBookmarkUIToPref()
|
function onSyncGroupBookmarkUIToPref()
|
||||||
|
@ -381,7 +381,7 @@
|
|||||||
<label value="&config.autoAttach.newTabCommand.label_after;"
|
<label value="&config.autoAttach.newTabCommand.label_after;"
|
||||||
control="extensions.treestyletab.autoAttach.newTabCommand-menulist"/>
|
control="extensions.treestyletab.autoAttach.newTabCommand-menulist"/>
|
||||||
</hbox>
|
</hbox>
|
||||||
<hbox align="center">
|
<hbox align="center" id="extensions.treestyletab.autoAttach.newTabButton-box">
|
||||||
<label value="&config.autoAttach.newTabButton.label_before;"
|
<label value="&config.autoAttach.newTabButton.label_before;"
|
||||||
control="extensions.treestyletab.autoAttach.newTabButton-menulist"/>
|
control="extensions.treestyletab.autoAttach.newTabButton-menulist"/>
|
||||||
<menulist id="extensions.treestyletab.autoAttach.newTabButton-menulist"
|
<menulist id="extensions.treestyletab.autoAttach.newTabButton-menulist"
|
||||||
|
@ -785,7 +785,7 @@ var TreeStyleTabService = {
|
|||||||
var tabbar = this.getTabStrip(this.browser);
|
var tabbar = this.getTabStrip(this.browser);
|
||||||
tabbar.addEventListener('click', this, true);
|
tabbar.addEventListener('click', this, true);
|
||||||
|
|
||||||
var newTabButton = document.getElementById('new-tab-button'); // Firefox 4 or later
|
var newTabButton = document.getElementById('new-tab-button');
|
||||||
if (newTabButton &&
|
if (newTabButton &&
|
||||||
!(tabbar.compareDocumentPosition(newTabButton) & Ci.nsIDOM3Node.DOCUMENT_POSITION_CONTAINED_BY))
|
!(tabbar.compareDocumentPosition(newTabButton) & Ci.nsIDOM3Node.DOCUMENT_POSITION_CONTAINED_BY))
|
||||||
newTabButton.parentNode.addEventListener('click', this, true);
|
newTabButton.parentNode.addEventListener('click', this, true);
|
||||||
@ -808,7 +808,7 @@ var TreeStyleTabService = {
|
|||||||
var tabbar = this.getTabStrip(this.browser);
|
var tabbar = this.getTabStrip(this.browser);
|
||||||
tabbar.removeEventListener('click', this, true);
|
tabbar.removeEventListener('click', this, true);
|
||||||
|
|
||||||
var newTabButton = document.getElementById('new-tab-button'); // Firefox 4 or later
|
var newTabButton = document.getElementById('new-tab-button');
|
||||||
if (newTabButton &&
|
if (newTabButton &&
|
||||||
!(tabbar.compareDocumentPosition(newTabButton) & Ci.nsIDOM3Node.DOCUMENT_POSITION_CONTAINED_BY))
|
!(tabbar.compareDocumentPosition(newTabButton) & Ci.nsIDOM3Node.DOCUMENT_POSITION_CONTAINED_BY))
|
||||||
newTabButton.parentNode.removeEventListener('click', this, true);
|
newTabButton.parentNode.removeEventListener('click', this, true);
|
||||||
|
@ -450,6 +450,8 @@ pref("extensions.treestyletab.autoAttach.newTabCommand", 0);
|
|||||||
/**
|
/**
|
||||||
* How to treat new tabs from middle click (or Ctrl-click) on the "New Tab" button.
|
* How to treat new tabs from middle click (or Ctrl-click) on the "New Tab" button.
|
||||||
* Options are same to extensions.treestyletab.autoAttach.newTabCommand.
|
* Options are same to extensions.treestyletab.autoAttach.newTabCommand.
|
||||||
|
* NOTE: This pref affects only on Firefox 4 or later. Firefox 3.6 doesn't open
|
||||||
|
* new blank tabs by middle click on the "New Tab" button.
|
||||||
*/
|
*/
|
||||||
pref("extensions.treestyletab.autoAttach.newTabButton", 0);
|
pref("extensions.treestyletab.autoAttach.newTabButton", 0);
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user