Reputation: 12249
Is there any way a google chrome extensions can detect whether a download was initiated? I could get all of the links and figure out which ones aren't html files and listen for those requests, but there are lots of exceptions and room for error, like having a pdf file open in the browser instead of download for example.
Upvotes: 0
Views: 1772
Reputation: 57115
This is now possible via the chrome.downloads
extension API. See https://developer.chrome.com/extensions/downloads for details.
Upvotes: 3
Reputation: 2131
There is nothing to suggest that this is possible in the Chrome API and I see no way of doing it using the DOM so I can only think that this is possible using an NPAPI plugin which may be overkill.
Do you really need to do this?
Upvotes: 1