I want to create a Firefox extension that creates a new icon in the address bar or replaces the existing one with the one specified in the extension.
And then, add some javascript to display this custom logo only when the user is viewing a particular domain.
If this is not doable for the location/address bar, displaying the logo on the status bar is ok (again driven by a javascript that displays the logo only when the user is on a particular domain).
Can this be done?
I don’t think favicon alone will solve my problem. I want to be able to display the icon/logo only when the user is on a specific domain (e.g. xyz.com/testPage.html or abc.com/anotherTest.html)
You can do that just using Greasemonkey. Here you have a quick script that works.
Greasemonkey’s manual: (Adding scripts)
If the site whose favicon you are trying to change already has one, you will have to do something like
before setting the new favicon, but I couldn’t get it to work.
There is a project to create a standard object for favicon manipulation that is supposed to work, but didn’t work for me.