aboutsummaryrefslogtreecommitdiffstats
path: root/commandBookmarklet.js
diff options
context:
space:
mode:
Diffstat (limited to 'commandBookmarklet.js')
-rw-r--r--commandBookmarklet.js5
1 files changed, 2 insertions, 3 deletions
diff --git a/commandBookmarklet.js b/commandBookmarklet.js
index e6fbbea..619ef5c 100644
--- a/commandBookmarklet.js
+++ b/commandBookmarklet.js
@@ -67,8 +67,7 @@ if (!items.length) {
return;
}
-for (let it in util.Array.iterator(items)) {
- let item = it;
+items.forEach(function (item) {
commands.addUserCommand(
[toValidCommandName(item.title)],
'bookmarklet : ' + item.title,
@@ -76,7 +75,7 @@ for (let it in util.Array.iterator(items)) {
{ shortHelp: 'Bookmarklet' },
false
);
-}
+});
function toValidCommandName(str) {
str = prefix + escape(str.replace(/ +/g, '').toLowerCase()).replace(/[^a-zA-Z]+/g,'');