Ikariam Notify

By Kahil Young Last update May 3, 2009 — Installed 1,263 times.

There are 2 previous versions of this script.

// ==UserScript==
// @name        Ikariam Notify
// @namespace   http://fluidapp.com
// @description Notifies you vie a dock badge when one of your advisors has something to say.  For Fluid users.
// @include     http://*.ikariam.*/*
// @author      Kahil Young
// ==/UserScript==


(function () {
    updateBadge();
    window.setInterval(updateBadge, 3000);
})();

function updateBadge() {
    if (['advCities', 'advMilitary', 'advResearch', 'advDiplomacy'].some(function(e) {
    if (document.evaluate('.//a[@class="normalactive"]', document.getElementById(e), null, 8, null).singleNodeValue) return true;
    if (document.evaluate('.//a[@class="normalalert"]', document.getElementById(e), null, 8, null).singleNodeValue) return true;
})) {        
                window.fluid.dockBadge = "!";
    }
}