View Multiple Link BGs

View Link Background ImageHave you ever right-clicked on a website graphic in Firefox expecting to find that handy “View Background Image” context menu item only to realize it wasn’t there because the element you right-clicked on was a link? No? Well it happens to me all the time. A little over a year ago I made a little Firefox extension to add that functionality for links.

Ever since Firefox 3.6 came out though, my little extension has been broken. I had no idea why until I dug into the JavaScript and discovered that Firefox was returning the CSS background image URL as url("imageurl") instead of url(imageurl). Stripping the double quotes was an easy fix but I also knew that FF 3.6 supported multiple backgrounds. Out of curiosity I set up a little html link styled with 2 background images and to my surprise getPropertyValue("background-image") returned url("imageurl1"), url("imageurl2"). Sweet! A few more lines of JavaScript and not only did the extension work again, but it works on links with multiple background images!

Grab v1.8 of View Link Background Image

Now for the sad part…

As I was experimenting with multiple background image support in Firefox 3.6, I discovered that the “View Background Image” context menu item is now missing when you right-click on elements that have multiple backgrounds. While the extension update adds the ability to see all the backgrounds applied to a link, Firefox itself lacks the ability to do the same for other elements. I’m sure I can take care of that with another extension update. For now though, I’m just happy to say it works again.

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to the top!