aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--direct_bookmark.js11
1 files changed, 2 insertions, 9 deletions
diff --git a/direct_bookmark.js b/direct_bookmark.js
index 4516e4d..fd0f94d 100644
--- a/direct_bookmark.js
+++ b/direct_bookmark.js
@@ -598,15 +598,8 @@
var comment = "";
var targetServices = useServicesByPost;
- for(var opt in arg){
- switch(opt){
- case '-s':
- if (arg[opt]) targetServices = arg[opt];
- break;
- case 'arguments':
- if(arg[opt].length > 0) comment = arg[opt].join(" ");
- }
- }
+ if (arg["-s"]) targetServices = arg["-s"];
+ if (arg.length > 0) comment = arg.join(" ");
var tags = [];
var re = /\[([^\]]+)\]([^\[].*)?/g;