Skip to content

Instantly share code, notes, and snippets.

@edvakf
Created August 11, 2009 01:40
Show Gist options
  • Save edvakf/165566 to your computer and use it in GitHub Desktop.
Save edvakf/165566 to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name SITEINFO Stats
// @namespace http://d.hatena.ne.jp/edvakf/
// @description Collect statistics for AutoPagerize SITEINFO
// ==/UserScript==
(function(fun){
if (window.AutoPagerize) fun();
else window.addEventListener('GM_AutoPagerizeLoaded',fun,false);
})(function(){
var flag = false;
window.AutoPagerize.addDocumentFilter(function(doc,url,info){
if (flag) return;
var api = [
'http://atsushuu.appspot.com/siteinfo/vote?',
'url=', encodeURIComponent(info.url), '&',
'nextLink=', encodeURIComponent(info.nextLink), '&',
'pageElement=', encodeURIComponent(info.pageElement)
].join('');
new Image().src = api;
flag = true;
})
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment