Is possible to create an extension that by selecting the URL or any text of the webpage text automatically generates an email (with your default email app) and adds the link or text selected to the body of the message and adds as subject of the email the title of the webpage? (e.g., if it is an article, to display the name of the article in the subject)
If there is alternatively a Chrome extension for this, feel free to recommend.
#popclip
name: Email Text
icon: symbol:mail
javascript: |
let to = ''
let subject = popclip.context.browserTitle.length > 0 ? popclip.context.browserTitle : 'Clipping'
let body = popclip.input.text
if (popclip.context.browserUrl.length > 0 ) {
body += '\n' + popclip.context.browserUrl
}
popclip.openUrl(`mailto:${encodeURIComponent(to)}?subject=${encodeURIComponent(subject)}&body=${encodeURIComponent(body)}`)
(The above block is an extension snippet - select it to install the extension with PopClip)
How would one tweak that where we could just have the selected text be added to body of the email, and not the url itself. Subject line could be empty.