" Copy URLs shortcut
" https://addons.mozilla.org/en-US/firefox/addon/copyurls/
command copyurls :emenu Edit.Copy Urls Expert.Tabs In This Window
+
+" FIXME
+" Post to Links Saraventos
+command! -nargs=* link js link(<args>);
+:js <<EOJS
+ link = function(args) {
+ var instance = 'https://links.sarava.org/bookmarks?action=add&address=';
+ var doc = content.document;
+ var href = encodeURIComponent(content.document.location);
+ var title = encodeURIComponent(content.document.title);
+ var desc = encodeURIComponent(doc.getSelection());
+ var tags = encodeURIComponent(args.toString().replace(/,,/g, ';').replace(/,/g, ' ').replace(/;/g, ', '));
+ commands.execute('tabopen ' + instance + href + '&title=' + title + '&description=' + desc + '&tags=' + tags);
+ }
+EOJS