mohamedmansour/set-wallpaper-extension — pull request #17 by revane (2011-12-30 05:12:51+00:00)
Title: Re-implementation of URL-getting logic

I re-implemented the URL-getting logic to not use the Windows function or libcurl. Instead. the NPAPI function NPN_GetURL is used instead. This asks the browser to get the file. This means the browser may just use the cached version or at the very least it knows any http authentication credentials for the domain in question so now the extension works on images that are protected by authentication (like digitalblasphemy.com).

There are a few things that could be cleaned up. Coding style isn't exactly consistent plus it might be nice to have better error reporting to the user.

Also note that the downloaded image is stored in a temp file somewhere created by the browser itself. I haven't tried to see what happens if the temp file gets deleted.

Please provide feedback and I'll clean things up. btw, my visual studio project file patch is back at home and will be coming eventually. This is the product of research and work in my spare time over Christmas break.