It's all spinning wheels and self-doubt until the first pot of coffee.

Firefox 3 Download Day Mega Widget

Update: Oh, and rumor has it that this widget will switch to reporting on downloads, rather than pledges, once the main event has begun.

Update 2: It didn't quite go like clockwork, but this widget is now showing estimated downloads by countries, rather than pledges.

Thanks to the completion of bug 435967, I can offer this totally unofficial hack of a mega widget (better late than never):

If you'd like, you can include this on your own site with a Copy-and-Paste of the following:

This is a total 2-hour cut, paste, reformat, and slight rejigger of Kent Brewster's work on Content Syndication with Case-Hardened JavaScript. Hopefully it works, because I'm releasing early before I've had a chance to check it out on anything besides the browsers in my lap.

Archived Comments

  • nice. are you getting any design help on that? it's looking a bit plain.

    commas and right alignment on the numbers at the very least would help a lot. and a total # (ooh, or a thermometer) would be neat.

  • I pasted your code into a post on my blog, it doesn't line up quite as nicely as yours. (isn't near as wide either, even though I have plenty of room)

  • @leonard: Nope, no design help - this was a 2 hour hack over a few days, including the server-side patch to get JSON out of the site. In fact, throwing in the Download Day logo was a last minute afterthought just before I posted this entry at lunch. Patches welcome :)

    @nicki: Hmm, it does look quite a bit smaller on your site. I might poke at the CSS a bit on my server to make it look nicer, since the styling I've done is very minimal.

  • I've tweaked the CSS for this thing a bit to make it more uniform across blogs, though not completely so.

    Additionally, I've added some config parameters if anyone would like to play with restyling it:

      <script type="text/javascript" src="http://decafbad.com/2008/download-day-top-ten.js">

    These will let you set the HTML ID for the widget, and the CSS file that gets dynamically loaded, respectively. One of the things I'm trying to do with this thing is hack a little closer toward having a tiny "widget framework" based on Kent's work.

    But, I'm a cruddy designer, so that part probably won't improve :)

  • Looks fantabulous, thank you! :)

  • Is it me, or all pledges are 10x of the real (I mean, there is "0" at the end of each country)

  • @willyaranda: Nope, it's not you, it's a bug. Ugh. Thanks for catching it - it should be fixed now. Man, I wish it were all 10x :)

  • Thanks to you and your widget!

  • Hey, nicely done!

    For what it's worth, the presentation layer may be created by generating the stylesheet on the fly, avoiding the extra HTTP call. I need to update Case-Hardened JavaScript to show how; for now, curious readers may visit my cleverly-hidden Web 2.0 presentation, here: http://kentbrewster.com/badges/, and see a quick example.

  • @Kent: Yeah, as further steps I was thinking of rolling in the CSS bits, and maybe flirting with some innerHTML evil to declare the initial widget in plain HTML rather than DOM construction calls. This was an event-inspired hack, but I've been meaning to tinker more with this stuff for ages :) Thanks for advancing the state of art!

  • بنیاد موزیلا باید به ایران به عنوان یکی از ده کشور برتر حامی خود توجه بیشتری نماید و در فارسی سازی افزونه ها و وب سایت اصلی خود شرکت اقدامات مقتضی را انجام نماید.

  • I don't understand this language, but it doesn't seem like spam—as long as you've not called my mother any nasty names, I thank you for the comment :)

    (And any translations would be welcome!)

  • the best forever incomparable forever on top forever all favorite forever

  • از مرورگر موزیلا بسیار راضیم بچه ها شما هم بگیرید

  • شرکت موزیلا ببین که ایرانین جو ده کشور دانلود کننده فایر فاکس هستند

    پس چرا سایت و خود برنامه فایر فاکس رو فارسی نمیکنی؟

  • VIVA IRAN We Are Waiting For Your Persian Services MOZILLA !!!!

  • خوشحالم که ایران هم بله ... !!!

  • http://www.iranian-it.net/itf/showthread.php?tid=1348

  • بهتره opera

  • firefox .!! we are here . ( iranian people)

  • hey FireFox !!!

    We are here!

    (Iranian people)

  • I'm proud to be a Firefox user and also to see Iran in top-ten list. I'm glad Iranians are a part of this celebration:)

  • akhe chera kos sher migin ... tu iran ki internet dare ke betune hamun 10 mego dw kone , yani vaghean fekr mikonin iran az canda ham bishtar dw karde? akhe cheghad shomaha koskholid pas chera iran tu in nist ? http://downloadcounter.sj.mozilla.com/

  • سلام با تشکر از زحمات بنیاد موزیلا خوشحالم شدم در مورد رکوردشکنی فایرفاکس امیدوارم زبان فارسی نیز جزو زبان های رسمی موزیلا باشه به امید آن روز

  • از موزیلا بدم میاد opera بهتره

  • متأسفانه تنظيم نمايش عدد به فارسي كه پيش از اين از قسمت bidi.numeral انجام مي شد در نسخه جديد اين امكان وجود ندارد و اعداد را به فارسي نمايش نمي دهد

  • با سلام و عرض تبریک به حضور تمامی فایر فاکس دوستان

  • فوق العاده بود . واقعا این فایرفاکس مهشره . اویول به همه ایرانیا

  • yashain iran usaki

  • kaf kardam roy in torkaro kam kardim

  • اینم جواب bandekhoda پس چرا ایران تو این لیست هستش : http://www.spreadfirefox.com/en-US/worldrecord/ اون لیست یه لیست ساده و استاتیک هستش

  • Hi mozilla Company. Im in IRAN and offer all my friends to downloading FF3 Because IRANIAN people LOVE ''Firefox'' IRANIANS need more support from MOZILLA.

  • i love mozilla

  • فقط میتونم بگم آخرشه . بهترین پیمانه و استاندارد برای برنامه نویسان و طراحان وب!!!! Just FireFox It's The Best Solution For Web Designer !!!!

    Be Fun

  • We Are Waiting For Persian Language and Other Additional for IRANian Users!

  • امیدوارم زبان فارسی نیز جزو زبان های رسمی موزیلا باشه

  • سلام ما ایرانیان با کمترین شرایط بهره وری از اینترنت حماسه می آفرینیم با سپاس

  • Hey MOZILLA !!! We are here for support you and so waiting for your PERSIAN services. ( from PERSIAN boys )

  • به نظر من هم موزیلا بهترین مرورگر اینترنته شرکت موزیلا هم باید امکانات فارسی رو به این همه کاربر فارسی زبان که از این مورورگر خوب استفاده میکنن اختصاص بده ای ول به Firefox

  • we support the mozilla project with download firefox3. viva Firefox viva persia...

  • hi. please start mozila by persian language for iranian. please.

  • persian menu?

  • ایول فایر فاکس 3 خیلی عالیه

  • So, I think what you're all saying is that you'd like Firefox in Persian? :)

    But alas, while I appreciate the sentiment, I don't think an entry on my blog about a JavaScript widget is the best place to rally support for the cause. Of course, localizing a JavaScript widget might be interesting someday...