Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Save all images from tabs to the right/left #57

Open
Hlsgs opened this issue Jan 31, 2018 · 9 comments
Open

Save all images from tabs to the right/left #57

Hlsgs opened this issue Jan 31, 2018 · 9 comments

Comments

@Hlsgs
Copy link

Hlsgs commented Jan 31, 2018

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!

@gyng
Copy link
Owner

gyng commented Feb 3, 2018

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!

@Hlsgs
Copy link
Author

Hlsgs commented Feb 4, 2018

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
Copy link
Author

Hlsgs commented Feb 5, 2018

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.

@DanaMW
Copy link

DanaMW commented Feb 5, 2018

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

@Hlsgs
Copy link
Author

Hlsgs commented Feb 5, 2018

@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.

@DanaMW
Copy link

DanaMW commented Feb 5, 2018

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.

@gyng
Copy link
Owner

gyng commented Feb 6, 2018

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

@Hlsgs
Copy link
Author

Hlsgs commented Feb 6, 2018

@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".

@gyng
Copy link
Owner

gyng commented Feb 10, 2018

  • 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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants