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
|
// Find the place to put the button
|
||||||
var toolbar;
|
|
||||||
var toolbars = toolbox.externalToolbars.slice();
|
var toolbars = toolbox.externalToolbars.slice();
|
||||||
for ( var child of toolbox.children ) {
|
for ( var child of toolbox.children ) {
|
||||||
if ( child.localName === 'toolbar' ) {
|
if ( child.localName === 'toolbar' ) {
|
||||||
|
@ -2441,7 +2440,7 @@ vAPI.toolbarButton = {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for ( toolbar of toolbars ) {
|
for ( var toolbar of toolbars ) {
|
||||||
var currentsetString = toolbar.getAttribute('currentset');
|
var currentsetString = toolbar.getAttribute('currentset');
|
||||||
if ( !currentsetString ) {
|
if ( !currentsetString ) {
|
||||||
continue;
|
continue;
|
||||||
|
@ -2455,10 +2454,9 @@ vAPI.toolbarButton = {
|
||||||
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 = document.getElementById(currentset[i]);
|
||||||
if ( before === null ) {
|
if ( before !== null ) {
|
||||||
continue;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
toolbar.insertItem(tbb.id, before);
|
toolbar.insertItem(tbb.id, before);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue