Created
February 18, 2011 17:01
-
-
Save fearphage/833991 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 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); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment