twitter-click-and-save icon indicating copy to clipboard operation
twitter-click-and-save copied to clipboard

Feature request: Prompt a download location instead of downloading directly

Open Developer2K opened this issue 1 year ago • 2 comments

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

Developer2K avatar Feb 12 '24 01:02 Developer2K

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.

AlttiRi avatar Feb 12 '24 09:02 AlttiRi

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.

Developer2K avatar Feb 13 '24 00:02 Developer2K