Modifying Web Capture bookmarklet

Hi there

I would like to use a web capture bookmarklet derivated from the one provided on the Drafts site (poup version) : Drafts Web Capture - Drafts User Guide

In order to get this display :

Title of the web page
blank line
URL without ( )
blank line
Selected text without >

I was able to remove the > and [] from title and () from URL but not to split title and url on 2 différent lines.

Any help would be appreciated.

Thanks
JC

1 Like

The Plain Text Bookmarklet Example provided in the web capture docs is very close to that…only missing the blank link between the title and URL. Will that work for you?

1 Like

I tried this one too, but as I am not a developper, I did not find out how to split the title/url line in 2 differents ones.

The title and URL are on a separate line in that example. Thought that might be close enough. Not sure if your need for the blank line is for a specific purpose or just a preference.

The below adds the extra blank line, if you paste this into the address field of your bookmarklet:

javascript:(function()%7Bs%3Ddocument.getSelection()%3B%0Aif%20(s%20%26%26%20s%20!%3D%20%22%22)%20%7B%0A%09s%3D%60%0A%0A%24%7Bs%7D%60%3B%0A%7D%0At%3D%60%24%7Bdocument.title%7D%0A%0A%24%7Blocation.href%7D%60%3B%0Au%3D%60https%3A%2F%2Fcapture.getdrafts.com%2F%3Fredirect%3Dback%26url%3D%24%7BencodeURIComponent(location.href)%7D%26text%3D%24%7BencodeURIComponent(t)%7D%24%7BencodeURIComponent(s)%7D%60%0Adocument.location%3Du%3B%7D)()%3B
2 Likes

Thanks so much, perfect !

A popup window would be a must but I do not want to take too much of your time.

This allows me to create a Drafts note, to add any useful information if necessary, and then to send it to Evernote with a specfic action.

Can I assume this isn’t browser-specific?