mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-13 02:14:17 +01:00
limit search of adjacent button to current toolbar
This commit is contained in:
parent
7e125b3b67
commit
e152db7004
1 changed files with 2 additions and 2 deletions
|
@ -2424,7 +2424,7 @@ vAPI.toolbarButton = {
|
||||||
toolbarButtonPanel.addEventListener('popuphiding', tbb.onViewHiding);
|
toolbarButtonPanel.addEventListener('popuphiding', tbb.onViewHiding);
|
||||||
toolbarButton.appendChild(toolbarButtonPanel);
|
toolbarButton.appendChild(toolbarButtonPanel);
|
||||||
|
|
||||||
if ( palette !== null ) {
|
if ( palette !== null && palette.querySelector('#' + tbb.id) === null ) {
|
||||||
palette.appendChild(toolbarButton);
|
palette.appendChild(toolbarButton);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2453,7 +2453,7 @@ vAPI.toolbarButton = {
|
||||||
// Found our button on this toolbar - but where on it?
|
// Found our button on this toolbar - but where on it?
|
||||||
var before = null;
|
var before = null;
|
||||||
for ( var i = index + 1; i < currentset.length; i++ ) {
|
for ( var i = index + 1; i < currentset.length; i++ ) {
|
||||||
before = document.getElementById(currentset[i]);
|
before = toolbar.querySelector('[id="' + currentset[i] + '"]');
|
||||||
if ( before !== null ) {
|
if ( before !== null ) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue