aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2015-06-18 11:50:06 -0300
committerSilvio Rhatto <rhatto@riseup.net>2015-06-18 11:50:06 -0300
commit81bb39274ab572dba424f61dc60a7f669d372377 (patch)
tree7237cf010ce96a173e730f9b267199e68c6df8f3
parent7dbed7d83269c1fdb43ad897026f2aabac8220ce (diff)
downloadvimperator-81bb39274ab572dba424f61dc60a7f669d372377.tar.gz
vimperator-81bb39274ab572dba424f61dc60a7f669d372377.tar.bz2
Scuttle: cleanup
-rw-r--r--vimperator.dot.link/plugin/scuttle.js7
1 files changed, 3 insertions, 4 deletions
diff --git a/vimperator.dot.link/plugin/scuttle.js b/vimperator.dot.link/plugin/scuttle.js
index 8ce2178..06f160a 100644
--- a/vimperator.dot.link/plugin/scuttle.js
+++ b/vimperator.dot.link/plugin/scuttle.js
@@ -35,14 +35,13 @@ commands.addUserCommand(['scuttle'], "Save page as a bookmark on Scuttle",
var re = new RegExp(/"([^"]+)"/);
var ext = args.string.match(re);
if (ext) {
- tags = args.string.substr(ext[0].length).replace(/,,/g, ';').replace(/,/g, ' ').replace(/;/g, ', ').replace(/%2C/g, ',');
+ tags = args.string.substr(ext[0].length)
url += "&extended=" + encodeURIComponent(ext[1]);
- url += tags;
} else {
- tags = "&tags=" + encodeURIComponent(args.toString().replace(/,,/g, ';').replace(/,/g, ' ').replace(/;/g, ', ')).replace(/%2C/g, ',');
- url += tags;
+ tags = args.string;
}
+ url += "&tags=" + encodeURIComponent(tags).replace(/,,/g, ';').replace(/,/g, ' ').replace(/;/g, ', ').replace(/%2C/g, ',');
var xhr = new XMLHttpRequest();
xhr.open("POST", url, false);
xhr.send(null);