diff options
| author | czaks <marcin@6irc.net> | 2013-12-29 18:32:58 +0100 |
|---|---|---|
| committer | Michael Foster <savetheinterpod@gmail.com> | 2014-01-19 14:52:01 -0500 |
| commit | 7ec82f878e379df85e7581266d319a82efdaf367 (patch) | |
| tree | 75e6326839920359c0796205061dff27a4d7ef48 /js | |
| parent | 0fb513d9ae37291b9e3a7511c47774aba88c024b (diff) | |
post-hover.js: fix long loop
Conflicts:
js/post-hover.js
Diffstat (limited to 'js')
| -rw-r--r-- | js/post-hover.js | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/js/post-hover.js b/js/post-hover.js index db434dfa..d96a55fc 100644 --- a/js/post-hover.js +++ b/js/post-hover.js @@ -24,6 +24,24 @@ onready(function(){ 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 hovering = false; var hovered_at; |
