So I made my first Firefox Add-on fuckyeah.jpg! Wait what, not so fast! What does it do?
Image Resizer/Scaler which is what it's called, adds the functionality to Firefox to resize/rescale any image by simply dragging at the image!
But wait that's not the only thing!
You can restore the original image's size by simply right clicking on it. We can also maximize the image by double clicking it.
But if that's annoying you, then you can always hold down the CTRL/META button to temporary disable the features mentioned above!
You can download the add-on here from Mozilla's add-on site: Image Resizer/Scaler
I swear that font size is pure concidence from copy pasting!
Nonetheless, since this is my first addon, I know it would be a good idea to ask for suggestions on the Firefox subreddit of Reddit.com, so of course I did; You see the discussion here: Reddit:My first add-on ever. Which lets you resize images by draggin!
Plenty of suggestions were made. It didn't take longer than an hour before I received replies, some of them suggested to make the dragging more sensitive to the mouse movement, which is a problem I quickly realized myself, so I did fix this by changing the algorithm from using percentage scaling to additive-subtractive math, in the end the algorithm got simpler and better! :)
Another suggestion was to add some way of resetting the scaled image back to its original scale, also a good idea, however I just spent hours trying to implement this using the Firefox add-on builder, and I can tell this isn't an easy task as it should or sounds like, apparentely the context-menu and the page-mod objects can't easily communicate between each other, so far I haven't figured a way around this yet, the documention they provided is quite poor when it comes to this, this is a task that should be easy, but isn't, but then again I'm probably just being awful at this :(
Still have interest? Go ahead and download the add-on and feel free to make any suggestions here, on reddit or on the Mozilla's add-ons page!