post-hover.js: fix long loop

Conflicts:
	js/post-hover.js
This commit is contained in:
czaks 2013-12-29 18:32:58 +01:00 committed by Michael Foster
parent 0fb513d9ae
commit 7ec82f878e

View File

@ -24,6 +24,24 @@ onready(function(){
return; return;
} }
var board = $(this);
var i = 0;
while (board.data('board') === undefined) {
board = board.parent();
i++;
if (i >= 10) return;
}
var threadid;
if ($link.is('[data-thread]')) threadid = 0;
else threadid = board.attr('id').replace("thread_", "");
board = board.data('board');
var parentboard = board;
if ($link.is('[data-thread]')) parentboard = $('form[name="post"] input[name="board"]').val();
else if (matches[1] !== undefined) board = matches[1];
var $post = false; var $post = false;
var hovering = false; var hovering = false;
var hovered_at; var hovered_at;