From 475f80239a485dd3ed48869a9438c2fa75442098 Mon Sep 17 00:00:00 2001 From: gorhill Date: Sun, 18 Oct 2015 08:41:27 -0400 Subject: [PATCH] toolbar icon: no need to keep looking for a spot once one found --- platform/firefox/vapi-background.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/platform/firefox/vapi-background.js b/platform/firefox/vapi-background.js index a6e2c4f51..b815b06a0 100644 --- a/platform/firefox/vapi-background.js +++ b/platform/firefox/vapi-background.js @@ -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 ) {