sindresorhus / refined-twitter

Browser extension that simplifies the Twitter interface and adds useful features
MIT License
1.31k stars 89 forks source link

Allow Default Download Location to be Last Saved-To Folder, Not Just "Downloads" Folder #150

Closed ZaCloud closed 3 years ago

ZaCloud commented 6 years ago

I'm so relieved that this extension takes away the problem of having to fix the .jpg_large or .png_large file extensions when saving images. However, it comes with a new annoyance: Choosing the "Downloads" folder in Windows every single time. I'd rather have it so it either uses my browser's settings to determine where I've set files to save... or allow us to choose from the extension's options: Download file to last saved-to folder.

For example: I'm on a binge of downloading cute cat pics, so I wanna download them to Pictures\Cute_Cats. The first one I download, I set the location and save. Then I go to save another cat picture... it should immediately put the Save/Download prompt to the Pictures\Cute_Cats folder since that's the last one I saved images to. Instead of me having to click back to it manually every single time from the default Downloads folder. :/

I'd be so grateful if this can be adjusted. Thanks.

Browser: Chrome (desktop). OS: Windows 8.1 (yeah, still hangin' in there, lol). Extension used on Tweetdeck.

sindresorhus commented 6 years ago

However, it comes with a new annoyance: Choosing the "Downloads" folder in Windows every single time.

Are you saying this problem doesn't exist if you disable Refined Twitter? If so, it's a Chrome bug, because this extension doesn't (and can't) control what directory shows up when you click "Save Image As…!".

ZaCloud commented 6 years ago

However, it comes with a new annoyance: Choosing the "Downloads" folder in Windows every single time.

Are you saying this problem doesn't exist if you disable Refined Twitter? If so, it's a Chrome bug, because this extension doesn't (and can't) control what directory shows up when you click "Save Image As…!".

Weird. But correct, when I disable Refined Twitter, Chrome once again defaults the window to my last-saved-to directory (as I have the browser set to). With Refined Twitter on, it's always defaults to showing the Downloads directory. Even on non-Twitter sites. I even went back into Chrome's setting and turned off/back on the "Ask where to save each file before downloading" option to see if that'd help. But no, when the extension is activated, it ignores the setting.

Edit: More like, it still DOES ask me where to save the file, not auto-downloading it, if I wasn't being clear... It's just that it starts in the Downloads directory every time, rather than where I last saved that kind of file.

The extension DOES require a permission to control the user's downloads (probably how it's supposed to fix the .jpg_large format, which was the only reason I got it). So I'm not sure if something in there could indeed still be tweaked.

If this IS a Chrome bug, then the extension might need to find a workaround so it'll work properly again (if indeed it used to). Cuz we all know Google doesn't respond to user input much at all, so their likelihood of fixing a bug that only emerges in light of an indie extension is probably nil. :/

ZaCloud commented 5 years ago

Is this being worked on to make it compatible with Chrome's quirks, or no? Just so I know if I'm waiting or just being left hanging, lol. ^_^;;

jorgegonzalez commented 5 years ago

https://github.com/sindresorhus/refined-twitter/blob/d7d647cdbd79c891db9e7224fd7a9bc805a52cf7/source/background.js#L24

This is the culprit. In Chrome, since we are adding an event listener to downloads, all future downloads are sent to the default downloads folder instead of the most recent saved-to folder. That's just the way it works.

https://stackoverflow.com/questions/22727109/how-to-remember-last-download-location-when-calling-chrome-downloads-download https://stackoverflow.com/questions/20152055/chrome-api-retrieving-most-recently-downloaded-file

The only solution would be to remove that line, but I'm pretty sure that will break something else.

ZaCloud commented 5 years ago

@sindresorhus , Any input on what @jorgegonzalez pointed out? Is the Chrome app ever gonna be made fully compatible with Chrome browser or not at some point? I'm in suspense here. ;P

mtlaird commented 5 years ago

I know this is an old issue, but if this plugin required download access to manage twitter's ridiculous usage of jpg_large files, is it possible that requirement could be removed? I believe twitter changed the way they display images recently, so that problem no longer exists.

I would be very excited if this lovely plugin didn't require that download listener anymore!

CollinChaffin commented 5 years ago

See my issue #189 it is related now I have ALL my download files naming being determined by this Twitter extension. IMO the download permission and small amount of code need to simply be removed there are other ways to perform simple url restamping to get the large pics - I do it all day long with userscripts on Twitter and other sites and don't require ANY browser download permissions or actions. Just rewrite all the hrefs and be done and let the browser handle all download actions as it does today.

ferenczy commented 4 years ago

I had the same issue - Chrome didn't remember my last download location. I have found some suggestions to disable various download helper extensions which neither of them I had. Then I have found this Github issue and since I'm using this extension, I have tried to disable it and voilà, the issue is "fixed".

The conclusion is, an extension can affect such behavior. Various extensions are (unintentionally, I guess) doing that actually.

Would be great to get it fixed, so I can enable the extension back.

sindresorhus commented 3 years ago

Closing as this extension is now deprecated: https://github.com/sindresorhus/refined-twitter/commit/8dd9df749d3a4e82c95b2bd6628c8d65f0f72e6c