hi, i want dynamically replace Castle Age's (facebook game) favicon, but strangely favicon doesn't change!
where am i wrong?? here is the code: // ==UserScript== // @name FB Castle Age // @namespace http://apps.facebook.com/castle_age/ // @include http://apps.facebook.com/castle_age/* // ==/UserScript== var head=document.getElementsByTagName("head")[0]; var ico={ e:document.createElement("link") } ico.e.id="ico_e";ico.e.rel="icon";ico.e.type="image/png"; ico.e.href="http://www.rw-designer.com/icon-image/273-16x16x32.png"; var getTimers=function(){ // energy var t=document.getElementById ("app46755028429_energy_time_value").innerHTML; var M=document.getElementById ("app46755028429_st_2_2").getElementsByTagName("span")[1].innerHTML; var c=document.getElementById ("app46755028429_energy_current_value").innerHTML; document.title=t+" "+c+"/"+M; var links=document.getElementsByTagName("link"); for(var i=0;i<links.length;i++){ var link=links[i]; if(link.rel=="shortcut icon"||link.rel=="icon"){ head.removeChild(link); } } head.appendChild(ico.e); setTimeout(getTimers,1000); } getTimers();
-- You received this message because you are subscribed to the Google Groups "greasemonkey-users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/greasemonkey-users?hl=en.
