Skip to content

Instantly share code, notes, and snippets.

@edvakf
Forked from os0x/gist:215813
Created October 22, 2009 08:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save edvakf/215821 to your computer and use it in GitHub Desktop.
Save edvakf/215821 to your computer and use it in GitHub Desktop.
function insertSITEINFO(callback,thisObject){
if (Set.DISABLE_IFRAME && window.parent !== window) return;
var src = (Set.SITEINFO_SERVER) ? Set.SITEINFO_SERVER + 'get?url=' + encodeURIComponent(location.href) : 'http://ss-o.net/json/wedataAutoPagerizeSITEINFO.js';
var sc = document.createElementNS(HTML_NAMESPACE, 'script');
sc.type = 'text/javascript';
window.AutoPagerizeCallbackSiteinfo = function(res){
callback.call(thisObject,res);
window.AutoPagerizeCallbackSiteinfo = null;
sc.parentNode.removeChild(sc);
var ev = document.createEvent('Event');
ev.initEvent('GM_AutoPagerizeSiteinfoLoaded', true, false);
document.dispatchEvent(ev);
};
sc.src = src;
function insert(){(document.body || document.documentElement).appendChild(sc);}
if (window.opera) document.addEventListener('DOMContentLoaded',insert,false);
else autopager();
}
if (window.opera && document.readyState == 'interactive') {
document.addEventListener('GM_AutoPagerizeSiteinfoLoaded',autopager,false);
document.addEventListener('DOMContentLoaded',autopager,false);
} else autopager();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment