diff options
-rw-r--r-- | vimperator.dot.link/plugin/scuttle.js | 7 |
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); |