toolbar icon: no need to keep looking for a spot once one found

This commit is contained in:
gorhill 2015-10-18 08:41:27 -04:00
parent 88dac6d4a1
commit 475f80239a
1 changed files with 2 additions and 1 deletions

View File

@ -2445,7 +2445,7 @@ vAPI.toolbarButton = {
if ( !currentsetString ) {
continue;
}
var currentset = currentsetString.split(',');
var currentset = currentsetString.split(/\s*,\s*/);
var index = currentset.indexOf(tbb.id);
if ( index === -1 ) {
continue;
@ -2459,6 +2459,7 @@ vAPI.toolbarButton = {
}
}
toolbar.insertItem(tbb.id, before);
break;
}
if ( document.getElementById(tbb.id) !== null ) {