gyng / save-in

WebExtension for saving media, links, or selections into user-defined directories
MIT License
205 stars 25 forks source link

Feature request: Allow saving selected text with url #19

Closed yoyoma2 closed 6 years ago

yoyoma2 commented 6 years ago

The savetexttofile addon no longer works in firefox 57. Allowing the user to select text and save/append it along with the page url would complete this addon's existing ability to save images/video/audio.

gyng commented 6 years ago

I don't see any way of doing this through the downloads API. I'm open to implementing this though, if there's a clean way to do this.

gyng commented 6 years ago

1.5 has a feature to save selected text. It's disabled by default, and you need to put a rewrite rule to rename the files, but at least it's something!

The filename rewrite rule for Firefox:

.{8}-.{4}-.{4}-.{12}
:pageurl:.txt

and Chrome:

.{8}-.{4}-.{4}-.{12}.txt
:pageurl:.txt

Please reopen if it doesn't work as expected.

gyng commented 6 years ago

In 1.6.0 the default filename is now the page title instead of the blob ID.

Instead, use

.*.selection.txt
:pageurl:.txt

The syntax might still change in the future.