save-in icon indicating copy to clipboard operation
save-in copied to clipboard

Save all images from tabs to the right/left

Open Hlsgs opened this issue 7 years ago • 9 comments

The title explains what I'm desperately after since FF57 and the death of the "Save Images" extension. Could you please look into this if/when you have the time? This extension does this, but with some major caveats:

  • it seems abandoned
  • it never worked for tabs that contained images, but whose URLs did not end in a simple image file extension, and that makes it useless for Facebook and Twitter which add parameters to images, for example
  • as of FF58, all extensions that attempt to save multiple files at once present the user with a save prompt for each individual file. I'm thinking this has to do with either a missing newly implemented permission or just a newly implemented limitation in the WE API. Any idea on this @gyng ?

Thank you for your great work and continued interest!

Hlsgs avatar Jan 31 '18 09:01 Hlsgs

Hey, the request seemed reasonable, so I went ahead and made a quick feature.

2.5.1 has an experimental option to save tabs from the tabstrip. It allows for saving tabs to the right, or other tabs opened from the selected tab. It doesn't fully replicate the functionality of tab-image-saver, but the other save-in features should work with this.

There's now a tab value for the context clause to target tabs saved in this way. There's no way to determine whether a tab is an image or video, so the rule to target images will have to target the filename instead

filename: .*(jpg|png|gif)
context: tab
into: images/:filename:

FF58 does not have any restrictions on saving multiple files.

It'll be great if bugs with this are reported!

gyng avatar Feb 03 '18 10:02 gyng

So far, so good, with a couple of caveats:

  • sometimes some images get saved multiple times. I've seen even 5 iterations
  • it opens a save dialog for tabs that are not images, instead of skipping them
  • the one feature that "tab-image-saver" has that I'm missing and I think would enhance this functionality greatly is auto-closing each tab after it's image is saved. This makes a lot of sense if there are tabs that don't contain images like above. Those should be skipped and not closed.

I'll keep testing. Thank you!

Hlsgs avatar Feb 04 '18 19:02 Hlsgs

Hello again!

Another issue: Twitter images that end in ":orig" open save dialogs with the extension pattern ".jpg_orig", while normal query parameters are successfully filtered out as expected.

Hlsgs avatar Feb 05 '18 14:02 Hlsgs

works correctly here with this rule: filename: (.*)(:|_)orig sourceurl: pbs.twimg.com capture: filename into: :$1:

DanaMW avatar Feb 05 '18 14:02 DanaMW

@DanaMW It doesn't. I'm not talking about the standard Save-in functionality, but of saving all tabs to the right, for which the custom rules seem to not apply.

Hlsgs avatar Feb 05 '18 14:02 Hlsgs

Does make sense that it should apply. I use that add-on SO much every day My most used but that feature I have not tried yet. My apologizes for interrupting.

DanaMW avatar Feb 05 '18 14:02 DanaMW

Hey, thanks for testing. I'll only be able to get to it once I get some time.

gyng avatar Feb 06 '18 02:02 gyng

@gyng No worries! I'll keep testing and report back. Thanks for doing this. You have no idea how much I was missing this one functionality of "Save Images".

Hlsgs avatar Feb 06 '18 02:02 Hlsgs

  • I've made a quick release (2.5.3) that throttles multiple downloads. Hopefully that helps with images being saved multiple times. I can't reproduce it reliably so it's hard to track down and fix.

  • Closing downloaded tabs is tricky, since I'm supporting the option to only download tabs that match a rule.

  • Issues with the twitter :orig images are probably due to having "Open a file save dialog if filename has no extension" being left on. The issue should go away if the file is renamed with a rule or that option is turned off.

  • it opens a save dialog for tabs that are not images, instead of skipping them

    Does only saving tabs that match a rule/disabling the no extension option work for this?

gyng avatar Feb 10 '18 05:02 gyng