diff options
| author | anekos | 2011-06-17 23:06:59 +0900 |
|---|---|---|
| committer | anekos | 2011-06-17 23:06:59 +0900 |
| commit | 742b0ec6275c5c0b8eeb1369be4af8bf9566a876 (patch) | |
| tree | 7256a209c9cfe326f12e4e5920c156b9663f277c | |
| parent | 060fff6544394a7025aba9b1bf6d7c41d567089e (diff) | |
| download | vimperator-plugins-742b0ec6275c5c0b8eeb1369be4af8bf9566a876.tar.bz2 | |
コマンド定義済みの場合にメッセージがうざいので確認するように
| -rw-r--r-- | commandBookmarklet.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/commandBookmarklet.js b/commandBookmarklet.js index 3375dce..811691c 100644 --- a/commandBookmarklet.js +++ b/commandBookmarklet.js @@ -75,8 +75,11 @@ if (!items.length) { } items.forEach(function (item) { + let name = toValidCommandName(item.title); + if (commands.get(name)) + return; commands.addUserCommand( - [toValidCommandName(item.title)], + [name], 'bookmarklet : ' + item.title, function () evalScript(item.url), { shortHelp: 'Bookmarklet' }, |
