0

I am trying to make a simple change to a standard diigo bookmarklet. I wish to add a fixed tag to the Diigo 'Add New Bookmark' form. My code is:

javascript:javascript:(function(){
var url=location.href;
var title=document.title||url;
var tagsvar='TestTag';
var desc=(window.getSelection?window.getSelection().toString():document.getSelection?
document.getSelection():document.selection.createRange().text);
window.open('https://www.diigo.com/post?
url='+encodeURIComponent(url)+'
&title='+encodeURIComponent(title)+'
&desc='+encodeURIComponent(desc)+'
&tags='+tagsvar+'&client=simplelet#main','_blank','menubar=no,height=580,width=608,toolbar=no,scrollbars=no,status=no');
})();

All I have added is:

var tagsvar='TestTag';

and

&tags='+tagsvar+'

Url, title and desc are correctly entered into the Diigo form but the tags field is blank.

I am new to javascript so probably a basic error. Thank you for your help

JinkyP
  • 1
  • 1
  • did you read the documentation about the format of `tags` ? did you try `encodeURIComponent(tagsvar)` ? – Raptor Jul 18 '13 at 03:51
  • Thankyou Shivan. I have tried encodeURIComponent(tagsvar) with same outcome. I cannot find any specific tags formatting requirements – JinkyP Jul 18 '13 at 04:10

0 Answers0