Instagram_Download_Button icon indicating copy to clipboard operation
Instagram_Download_Button copied to clipboard

Downloading is not working on Firefox.

Open UnCrevard opened this issue 6 months ago • 4 comments

The fetch method to download file is not working for Firefox (cors problem most of the time).

A better way is to use the tampermonkey downloader. Simply add @grant GM_download to script headers then change the function downloadResource by GM_download(url,filename+".mp4")

GM_download is done with webext. So no cross-origin problem.

I have to fix the script at every update 😅

UnCrevard avatar Jan 27 '24 17:01 UnCrevard

Thanks!

Add an if statment to sort between jpg and mp4..

if (url.contains("mp4")) { GM_download(url, filename+".mp4"); } else { GM_download(url, filename+".jpg"); }

dinners5 avatar Feb 02 '24 03:02 dinners5

I managed to get it working in Firefox by commenting out the 732nd line in code. Before: 'User-Agent': window.navigator.userAgent After: // 'User-Agent': window.navigator.userAgent

pghadq716010i2ji8x3z9g9b4ot7

DohnJoe2 avatar Feb 13 '24 01:02 DohnJoe2

Don't add me.

grant avatar Feb 13 '24 01:02 grant

Confirmed. With CORS mode, at least Firefox seems to be like this. "User-agent header is only permitted for CORS when the server has opted in with "Access-Control-Allow-Headers: user-agent""

Haven't checked Chrome, but I would assume it's similar.

Patty-OFurniture avatar Mar 04 '24 18:03 Patty-OFurniture