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

Feature request: Prompt a download location instead of downloading directly #39

Open
Developer2K opened this issue Feb 12, 2024 · 2 comments
Labels
enhancement New feature or request question Further information is requested

Comments

@Developer2K
Copy link

I think it would be at least be a great option to prompt a download location instead of downloading directly.

@AlttiRi AlttiRi added the enhancement New feature or request label Feb 12, 2024
@AlttiRi
Copy link
Owner

AlttiRi commented Feb 12, 2024

It uses the default browser's settings "Ask where to save each file before downloading".


Also, GM_download with subpaths aren't supported in ViolentMonkey.

Although, there is a browser's File System Access API to prompt "Save as...".
But it's still experimental, Chrome only.
https://developer.mozilla.org/en-US/docs/Web/API/window/showSaveFilePicker

let fileHandle = await self.showSaveFilePicker({    
  suggestedName: `Example File System Access API Text File (${Date.now()}).txt`,
  types: [{
    description: "Text documents",
    accept: {
      "text/plain": [".txt"],
    },
  }],
});
let writable = await fileHandle.createWritable();
await writable.write(new Blob(["Current date: " + new Date()]));
await writable.close();

I think it's more effective to not spend time and attention to "Save as..." dialog, one click and a file is downloaded.
Just sometimes sort your files, if you need. More over, Twitter's files are prefixed with [twitter] , so it's not a problem so select them among other files in the download folder.

@Developer2K
Copy link
Author

It uses the default browser's settings "Ask where to save each file before downloading".

Apologies for not checking this first. Thank you for the reply, I'll use this method.

@AlttiRi AlttiRi added the question Further information is requested label Feb 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants