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