appending something to a bookmarklet-generated url

58 Views Asked by At

I'm using a bookmarklet to post URLs to my known installation.

javascript:(function(){window.open('http://xyz/known/share?share_url='+encodeURIComponent(location.href)+'&share_title\='+encodeURIComponent(document.title));})();

This returns the URL:

http://xyz/known/share?share_url=http%3A%2F%2Fwww.stichpunkt.de%2Fbookmarklets%2F&share_title=Bookmarklets

I want to have

&share_type=bookmark

appended to the url, yet since I don't understand JavaScript, fail to.

1

There are 1 best solutions below

0
On BEST ANSWER

You can try this:

javascript:(function(){window.open('http://xyz/known/share?share_url='+encodeURIComponent(location.href)+'&share_title\='+encodeURIComponent(document.title) + '&share_type=bookmark');})();