Created
October 22, 2009 07:34
-
-
Save os0x/215813 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function insertSITEINFO(callback,thisObject){ | |
var isPageLoaded = false, isSiteinfoLoaded = false, Siteinfo; | |
document.addEventListener('DOMContentLoaded',function(){ | |
isPageLoaded = true; | |
if (isSiteinfoLoaded) { | |
callback.call(thisObject, Siteinfo); | |
Siteinfo = window.AutoPagerizeCallbackSiteinfo = null; | |
} | |
},false); | |
var src = 'http://ss-o.net/json/wedataAutoPagerizeSITEINFO.js'; | |
if (Set.DISABLE_IFRAME && window.parent !== window) return; | |
var sc = document.createElementNS(HTML_NAMESPACE, 'script'); | |
sc.type = 'text/javascript'; | |
window.AutoPagerizeCallbackSiteinfo = function(res){ | |
isSiteinfoLoaded = true; | |
if (isPageLoaded) { | |
callback.call(thisObject,res); | |
window.AutoPagerizeCallbackSiteinfo = null; | |
} else { | |
Siteinfo = res; | |
} | |
}; | |
sc.src = src; | |
(document.body || document.documentElement).appendChild(sc); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment