This user script for the Greasemonkey (v0.2.6+) Firefox extension adds an animated counter (all animated with javascript) of the total number of Firefox downloads to the upper right corner of html pages. You can toggle fading by clicking on it, click and drag to move it around, double click (on the firefox picture) to close it. The script makes use of the Firefox counter from Infocraft, but provides a different display available on all pages.
The script (without Greasemonkey) can be used on regular web pages (at least for Firefox users), and the counter should be running in the upper right corner right now. The user script defaults to running on all pages, but I would suggest you specify certain pages that you wouldn't mind seeing the counter.
Make sure you have at least version 0.2.6 of Greasemonkey for GM_xmlHttpRequests to work.
Default faded counter
Clicked visible counter
Click-drag moved counter
Extra info
- If you install the user script, you can open up about:blank to have a page with just the counter by itself. :)
- The user script makes use of individual digit images and plays with the background and padding to shift digits.
- The script handles large download numbers fine (200+ digits get displayed correctly.. but that's a lot of downloads. :P)
- The display should shift correctly when more/fewer digits are needed for the display.. (at least it looked smooth at 4 in the morning)
- If you want to look through the code, make sure to keep track of closures and which variables are referencing which.
- Click and dragging doesn't seem to always work.. and when it does, Firefox displays the rest of the page's content strange..
- The data uri's were made with data: URI kitchen with base64 and unescaped with javascript
- The script calls spreadfirefox.com's download counter rss feed, so it'll make that connection on every page load. (It'll probably send referer info too.. It seems like you have to manually set the referer in the headers to get it sent with xmlhttprequests.)
- With the changes of the feed no updating every page load, I put in a default download rate that is very conservative (for most of the day), but once the script gets the update, it'll move at the correct (faster) speed.
- Like in that last image up there, there is a ghosting effect, and I have no idea why...
- There are probably a bunch of tiny little tricks I made to get this to work like the "screen" to prevent selecting the digit image elements and plenty of anonymous javascript functions. :)
- If the page the user script runs on has some css already.. it's possible the counter display will get messed up..
- A little testing page for the counter