public
Created

  • Download Gist
gistfile1.txt
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
function initFixComments() {
function jumpToPage(url, pages, posts, e) {
var page, link = e.target, tf = true;
link.addEventListener('click'
,function(e) {
e.stopPropagation();
link.removeEventListener('click', arguments.callee, tf);
}
,tf
);
link.addEventListener('mouseup'
,function(e) {
e.stopPropagation();
link.removeEventListener('mouseup', arguments.callee, tf);
}
,tf
);
if (page = prompt('Page number (1-' + pages + '):', pages)) {
//opera.postError('page = ' + page +'\n' + getPageUrl(url, (isNaN(page) ? 0 : page), posts))
opera.postError('location.href = ' + (location.href = getPageUrl(url, (isNaN(page) || page > pages ? pages : page), posts)));
}
}
function getMouseDownEnclosure(id, pages, posts) {
return function(e) {
timer = setTimeout(jumpToPage, options.clickTime, id, pages, posts, e);
};
}
function clearTimer(e) {
clearTimeout(timer);
}

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.