Skip to content

Instantly share code, notes, and snippets.

@topfunky
Created August 29, 2008 22:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save topfunky/8069 to your computer and use it in GitHub Desktop.
Save topfunky/8069 to your computer and use it in GitHub Desktop.
(function(i) {u = navigator.userAgent; e = /*@cc_on!@*/false; st = setTimeout;
if(/webkit/i.test(u)){st(function(){dr = document.readyState;if(dr=="loaded"||
dr=="complete"){i();}else{st(arguments.callee,10);}},10);}else if((/mozilla/i.
test(u)&&!/(compati)/.test(u))||(/opera/i.test(u))){document.addEventListener(
"DOMContentLoaded",i,false);} else if(e){(function(){t=document.createElement(
'doc:ready');try{t.doScroll('left');i();t= null;}catch(e){st(arguments.callee,
0);}})();}else{window.onload = i;}})(function() {
// Stylesheet loaded into HEAD tag directly, but in-line it to avoid
// making another HTTP request.
var s=document.createElement('style');
document.getElementsByTagName('head')[0].appendChild(s);
var css = "";
if(!!window.ActiveXObject) { // ie.
document.styleSheets[document.styleSheets.length-1].cssText = css;
} else {
stylenode = document.createTextNode(css);
s.appendChild(stylenode);
}
badge = document.getElementById("my_div");
if (badge) badge.innerHTML = 'MY HTML';
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment