Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.