RandomEngy / RehostImage

Rehost Image is a Firefox extension that adds a right-click option for images: "Rehost Image and Copy to Clipboard". This will upload the image to alternate hosting, then copy the URL of the uploaded image to your clipboard.
caa:addon/rehost-image
MIT License
6 stars 2 forks source link

Adding more hosts #1

Closed danmun closed 7 years ago

danmun commented 7 years ago

Added the following hosts Dropfile.to ImgSafe.org Pomf.cat Biyori.moe

Also, I put all the code responsible for uploading into a new 'uploaders' directory, and changed the file paths accordingly in rehostimage.xul.

Packaged and tested locally.

RandomEngy commented 7 years ago

Wow, looks really awesome. Just one issue: it looks like Dropfile is copying the "container page" URL to the clipboard and not the image itself. Is there any way to get it to copy the direct image so it behaves like the other hosts?

danmun commented 7 years ago

I have not found a way to do that. The direct image link doesn't appear in their API response, and it's completely unrelated to the "container" link. I thought about adding a warning message to its GUI panel, that it won't be a direct link, but then didn't. So i can either remove dropfile or add the warning.

RandomEngy commented 7 years ago

I think adding a warning would be fine.

danmun commented 7 years ago

Now that i think about it, i could get the direct image link but it would require an additional GET after the "container" page link has been fetched.

danmun commented 7 years ago

It now copies the direct image URL. Sorry for the multiple commits, forgot to proof read the code...

RandomEngy commented 7 years ago

Alright, merged, built and submitted for review. Thanks for the contribution!