简体   繁体   中英

Can I create a Chrome Extension that save images to specific names?

I like to save images to my hard-drive to create mood-board for art projects. I usually use Date.now() in chrome's console to create a string of number and copy the number as my file name - so the saved images are in the an order - it is easier for me to look them up later.

I thought, it would be convenient if I create an extension to help me to accomplish this.

So I want to create a new option in the context menu and call it "Download This Image" and when I click it, it will automatically generate a string of number and use them as the default file name. Unfortunately, it doesn't quite work out.

The reason I want to create a new option is that, most of the time, I don't want to change the filename of the images I download. I only want to change them when I want to save them to my inspirational folder.

Okay. I solved this. Here is the extension's source code if anyone is interested.

https://github.com/aeroxy/save_image

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM