A very common purpose of Greasemonkey scripts is modifying the DOM structure of the document, mostly adding something new. I’ve written several scripts before and have been doing such modifications in the “load” event handler, as in this script. The problem is that “load” event is fired after all images on the page have been… Continue reading DOMContentLoaded and Greasemonkey
Tag: Firefox
Google Reader Unread Count
Gmail is my Firefox home page and is always open as long as Firefox is there. So I wrote this Greasemonkey script to show Google Reader’s unread count in the nav-bar of Gmail. A good place, isn’t it? The script checks for the unread count every 8 minutes. But after you click the “Reader” link,… Continue reading Google Reader Unread Count
Fading Image With Firefox 3
As you may noticed, when you drag some selected text or an image, Firefox 3 displays the “ghost” with fading effect. This feature can be used to create a fading image. First choose your image to fade. If it’s on your disk, just drag it into a Firefox tab. Press Ctrl+T to open a new… Continue reading Fading Image With Firefox 3
Remove Dotted Link Borders in Firefox
When you use a HTML link (“<a>” tag) to implement a drop-down list or menu, you’ll notice that there are annoying dotted borders around the link after it’s clicked in Firefox. We can just ignore this for most of the times but sometimes it affects the look and feel of the site. Two screen shots… Continue reading Remove Dotted Link Borders in Firefox
Readonly Text Input Background Color in Firefox
The other day I was stuck when trying to make the background-color of a readonly text input white in Firefox. Today lots of sites are using readonly text inputs to carry out some urls for propagation or some code snippets for embedding in your own pages. For example, every Youtube video has such a input… Continue reading Readonly Text Input Background Color in Firefox