Anything can go here, in any language... except my native language Sinhala. Be cool... anybody is warmly welcomed! :)

Fedora Counters For Your Blog

The upcoming version of Fedora, Fedora 11 (Leonidas ) is to be released on May 26th, 2009 [schedule].

They have prepared a counter badge that anybody interested can put it in his/her own web site. I have also put one in my Sinhala blog. So, dear reader, if you also have a blog/ site, please put a badge on your site and help spread the power of human knowledge (human knowledge - that's how Richard M Stallman defines free software).

But there is a problem with the badge. They provide a script (hosted on their servers) so it may not be available in the size you prefer. In my Sinhala blog, my preferred size is 120 pixels. The code they previde is this:

<script id="fedora-banner" type="text/javascript" src=""></script>

So I had to download the script and modify it. So here's the modified code and you can simply copy-paste it into a HTML/Javascript widget in your blog. You can modify the 23rd line (bannerimg.setAttribute("width", "120px");) of this code to adjust the badge size.

<script id="fedora-banner" type="text/javascript" language="javascript">

var available_langs = [ "en", "it" ];

var today = new Date();
var release = new Date("May 26, 2009 14:00:00 UTC");
var millisBetweenDates = release - today;
var days = Math.ceil(millisBetweenDates/1000/60/60/24);

var script = document.getElementById('fedora-banner');
var lang = "en"

var url = "";

var banner = document.createElement('div');

var bannerlink = document.createElement('a');

var bannerimg = document.createElement("img"); = "none";

bannerimg.setAttribute("width", "120px");

if (days <= 0) {
    // TODO: Get an actual image here!
    bannerimg.setAttribute("src", "");
    bannerimg.setAttribute("alt", "Fedora 11 is here!");
    url = "";
} else {
    bannerimg.setAttribute("src", "" + lang + "/fedora11-countdown-banner-" + days + "." + lang + "." + "png");
    bannerimg.setAttribute("alt", "Fedora 11 Leonidas released in " + days + " days.");

bannerlink.setAttribute("href", url);


script.parentNode.insertBefore(banner, script);


If you are interested, please put a counter on your blog too.

Thank you for reading.

Comments (0)


Subscription Options

 Subscribe in a reader


Enter your email address:

to inscrease

and make me happy. :)

Other Blogs by the Author

The Author
ශාකුන්තල | Shaakunthala's items Go to ශාකුන්තල | Shaakunthala's photostream
free counters
Related Posts with Thumbnails