corbindavenport / share-to-mastodon

Browser extension for sharing links and tabs to Mastodon (and other Fediverse platforms)
https://chrome.google.com/webstore/detail/bibnjflclpdmbbcncejifemmbggkcjde
GNU General Public License v3.0
61 stars 0 forks source link

Feature request: add selected text to the message #12

Closed nd- closed 1 year ago

nd- commented 1 year ago

Hello,

thanx for your extension, very usefull for a daily use.

It would be nice if the text selected on the page were added to the message, below the link to the page. Some scriptlets do this with window.getSelection() but it sometimes causes errors on some sites.

corbindavenport commented 1 year ago

I don't think this is possible from the keyboard shortcut or toolbar button without adding more permissions, but it is already supported from the context menu. If you select text (instead of just right-clicking the page) and then choose Mastodon, the selection you quoted will replace the page title in the share box :)

image

nd- commented 1 year ago

Oh yes, I never noticed that right click method, thanx.

And I see there's the same limit as when using a scriptlet: mastodon share urls (https://server.exemple/share?text=) send a 502 error if the text is longer than approximately 300 chararcters.

corbindavenport commented 1 year ago

Good to know, I've opened #13 for addressing that bug.