xiaoxiaoflood / firefox-scripts

userChromeJS / autoconfig.js and extensions
Mozilla Public License 2.0
944 stars 83 forks source link

DownThemAll will not download links in iframes #163

Open Jontron123 opened 1 year ago

Jontron123 commented 1 year ago

When right clicking on a link within an iframe and selecting "Save Link with DownThemAll!", a message saying "The Selected link is not a file dTa knows how to download!" instead of downloading the link.

When opening the page outside of an iframe, DownThemAll is able to download the link without a problem.

I did some basic investigating, but am not sure how to fix it. Here is the output from the DownThemAll log:

23:46:32::815
DownThemAll! (error) - Failed to get target data [Exception: cur is null]
handleSaveTarget@chrome://dta-modules/content/loaders/integration-content.js?1658461538981:515:13
--> chrome://dta-modules/content/loaders/integration-content.js?1658461538981:515:0
23:46:32::816
DownThemAll! (error) - Failed to process single link [Exception: cur is null]
    saveSingleLinkAsync() @ chrome://dta-modules/content/loaders/integration.js:478
--> chrome://dta-modules/content/loaders/integration.js:478:0

My best guess is that the call to "ContentDOMReference.resolve" withing the function "handleSaveTarget" in the file "integration-content.js" is returning null when the "targetIdentifier" refers to an iframe.

xiaoxiaoflood commented 1 year ago

Could you please give me an example link?

Tried it here and it's working fine.

Jontron123 commented 1 year ago

Here you go: https://iframetester.com/?url=https://code.downthemall.org/nightly/dta-3-0/