aboutsummaryrefslogtreecommitdiffstats
path: root/commandBookmarklet.js
diff options
context:
space:
mode:
authordrry2008-04-09 17:46:19 +0000
committerdrry2008-04-09 17:46:19 +0000
commit67e78bae03b218db17646b5c4ba5c35b3bb2bee4 (patch)
tree0d4f14a31d5f4731b7e6f0d6792f8a9cdfe5fc50 /commandBookmarklet.js
parentf75a7728bb3c3c8191f74ef57574391ee72f6760 (diff)
downloadvimperator-plugins-67e78bae03b218db17646b5c4ba5c35b3bb2bee4.tar.bz2
lang/javascript/vimperator-plugins/trunk/commandBookmarklet.js:
* 整理しました。 git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@9230 d0d07461-0603-4401-acd4-de1884942a52
Diffstat (limited to 'commandBookmarklet.js')
-rw-r--r--commandBookmarklet.js13
1 files changed, 7 insertions, 6 deletions
diff --git a/commandBookmarklet.js b/commandBookmarklet.js
index 5839b26..9a37c97 100644
--- a/commandBookmarklet.js
+++ b/commandBookmarklet.js
@@ -7,11 +7,11 @@
(function(){
var filter = "javascript:";
- var items = liberator.bookmarks.get(filter);
+ var items = liberator.bookmarks.get(filter);
if (items.length == 0) {
if (filter.length > 0) {
- liberator.echoerr("E283: No bookmarks matching \"" + filter + "\"");
+ liberator.echoerr('E283: No bookmarks matching "' + filter + '"');
} else {
liberator.echoerr("No bookmarks set");
}
@@ -20,9 +20,10 @@
items.forEach(function(item) {
var [url, title] = item;
if (width(title) > 50) {
- while (width(title) > 47)
- title = title.slice(0, -1);
- title += "...";
+ while (width(title) > 47) {
+ title = title.slice(0, -2);
+ }
+ title += "...";
}
title = liberator.util.escapeHTML(title);
@@ -33,7 +34,7 @@
"bookmarklet",
command,
{
- shortHelp: "bookmarklet",
+ shortHelp: "Bookmarklet",
}
);
});