mirror of https://github.com/gorhill/uBlock.git
minor code review
This commit is contained in:
parent
a19f5701ef
commit
88dac6d4a1
|
@ -2433,7 +2433,6 @@ vAPI.toolbarButton = {
|
|||
};
|
||||
|
||||
// Find the place to put the button
|
||||
var toolbar;
|
||||
var toolbars = toolbox.externalToolbars.slice();
|
||||
for ( var child of toolbox.children ) {
|
||||
if ( child.localName === 'toolbar' ) {
|
||||
|
@ -2441,7 +2440,7 @@ vAPI.toolbarButton = {
|
|||
}
|
||||
}
|
||||
|
||||
for ( toolbar of toolbars ) {
|
||||
for ( var toolbar of toolbars ) {
|
||||
var currentsetString = toolbar.getAttribute('currentset');
|
||||
if ( !currentsetString ) {
|
||||
continue;
|
||||
|
@ -2455,11 +2454,10 @@ vAPI.toolbarButton = {
|
|||
var before = null;
|
||||
for ( var i = index + 1; i < currentset.length; i++ ) {
|
||||
before = document.getElementById(currentset[i]);
|
||||
if ( before === null ) {
|
||||
continue;
|
||||
}
|
||||
if ( before !== null ) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
toolbar.insertItem(tbb.id, before);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue