Skip to content Skip to sidebar Skip to footer

CHROME Ext/app - Single Click For Image Download

I would like a simple Chrome App or Ext to download images faster. Currently, you have to right click and choose save as, etc. I have looked at this APP which came close (https://c

Solution 1:

You can do this using a content script to inject script into the pages where you want the functionality:

https://developer.chrome.com/extensions/content_scripts

Inside your content script, you'll want to add an event listener for 'click' that looks at the MouseEvent you get passed and sees if the 'altKey' property is set to true. If so, you can then do the download.

Note that many of the extension APIs are only available to be called from an extensions own pages (eg the background page, browser action popups, etc.) and not directly in the content script. So in this case what you may need to do is use the messaging API to have the content script send a message over to your background page with the URL of the image to download. See https://developer.chrome.com/extensions/messaging for more details.


Post a Comment for "CHROME Ext/app - Single Click For Image Download"