-
Notifications
You must be signed in to change notification settings - Fork 289
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Download all images on the page #480
Comments
@aashu0148 here's another one that needs finished if you're lookin for another plugin to hack on!? the #481 has the work started but needs a few tweaks before it's ready. 🙂 |
I'll check for sure. |
@argyleink I'll be happy to work on this issue but can you please tell me where the javascript file is located from which i can access the value entered in the search box. |
sure! |
Hey @argyleink I'm really sorry for this delay but first i was busy in my family functions and then i got my exams but i thought i can easily make a good percentage in my exams but after giving my first exam i realized that this will not going until i dedicatedly study for it... so I decided to study for my exams and forgot about informing you..... yesterday was my last exam. I'll be working on this issue from now itself. Again So sorry for accepting this issue and not active for such a long period :( |
hey @argyleink I run it on my machine and it is downloading all the images. |
yes, sorry, I see I never listed the missing aspects of the feature! Currently, the user picks a folder to save the images to, and all the images download, but there's many that are broken and the original names of the images is lost. A file named
Thanks for the help! |
also, would be cool if it downloaded all images that were referenced via CSS too! background images, etc. want to investigate level of effort to adding that too? |
okay @argyleink we will move to CSS images also later on but now let me work on javascript to complete the above mentioned tasks :) |
hey @argyleink first task is completed i think. If not please let me know; |
hey @argyleink to check for showDirectoryPicker can we put it into try and add a alert in catch. |
nice work on the names and file extensions 👍🏻 you could try catch for feature testing yeah. i just tested this and it works too: if (window.showDirectoryPicker === undefined)
console.log('no directory support') |
here's some JS that grabs the external urls from stylesheets on the page: let css_urls = [...document.styleSheets]
.filter(sheet => {
try { return sheet.cssRules }
catch {}
})
.flatMap(sheet => Array.from(sheet.cssRules))
.filter(rule => rule.style)
.filter(rule => rule.style.backgroundImage !== '')
.filter(rule => rule.style.backgroundImage !== 'initial')
.filter(rule => rule.style.backgroundImage.includes("url"))
.reduce((urls, {style}) => {
urls.push(style.backgroundImage);
return urls;
}, []);
console.log(css_urls); output example:
seems doable with this concept proof yeah!? |
ya it seems you already done most of my work. |
hey @argyleink I'm stuck with an awkward issue :/ can you please take a look at it. I'll also continue to find the problem and update you if it is solved. |
Also in the source tab of dev tools the code is not what i have in my vs code. |
hm! I can try to help 🙂
|
Thanks @argyleink there are some errors while running npm start now it is working. but can you tell me what to put in the name when we download css images because we fetch them from a url and hence can't find the name. so should i name them like css-1,css-2,... ? |
@argyleink ??🤔 |
Can you give me examples of what you mean? URLs with no names? |
yaa sure then we don't have a name for this image then how can i name such images... I have currently named them as css-1 , css-2 , css-3 .... |
@argyleink 🤔🤔🤔 |
hey @argyleink where are you ?? |
Vacation 😁 |
oh :) |
early january! but i can give some feedback real quick 👍🏻 some url rules?
that way really long ones can be cropped, and if they're still too long, they can be maxed out then saved. thoughts? |
ya its great i'll implement it and update you |
Its done @argyleink Please review it :) |
Looks ready to share! Submit a pr? |
already made a pr. please review it |
hey @argyleink can you please tell me how can i use this project locally with any website? |
Here's a wiki page with some instruction: https://github.com/GoogleChromeLabs/ProjectVisBug/wiki/Local-Extension-Dev-Testing your github repo Let me know if you need more help 🙂 |
ya @argyleink I need some more help! First of all i really like this project idea and i want to contribute more to it until i have time from my studies and all stuff. Also i saw the link and in the download section of it i saw this error page. |
/download-images
command in the search bar runs the following plugin scripthttps://paul.kinlan.me/bookmarklet-to-download-all-images-on-a-page-with-the-file-system-api/
The text was updated successfully, but these errors were encountered: