Javascript Bookmarklet fails in IE8
- by songdogtech
Anyone want to take a stab at why this bookmarklet fails in IE8? It turns all text uppercase in Friefox and Safari. But in IE8, it simply stalls with "loading..." I've enabled scriplets and the security settings in IE8.
Update 3/13/10: I've discovered that IE limits the data length of Favorites, so I need to find a work around to prevent IE from truncating the bookmarklet.
javascript:
(function(){
var i,t,D=document;
for(i=0;t=D.getElementsByTagName('textarea')[i];++i)
t.value=t.value.toUpperCase();
var newSS,styles='*{text-transform:uppercase}input,textarea{text-transform:none}';
if(D.createStyleSheet){
D.createStyleSheet("javascript:'"+styles+"'");
}
else{
newSS=D.createElement('link');
newSS.rel='stylesheet';
newSS.href='data:text/css,'+escape(styles);
D.documentElement.childNodes[0].appendChild(newSS);
}
}
)()