diff options
| author | czaks <marcin@6irc.net> | 2013-07-22 23:29:24 -0400 |
|---|---|---|
| committer | czaks <marcin@6irc.net> | 2013-07-22 23:29:24 -0400 |
| commit | 6bc309697edfa5ab1c2cf22d945361bb8a210baa (patch) | |
| tree | 95a08dc3aa92fae76342ffdb0a830c1101d1171c /js | |
| parent | d111c6ab8c9ef12440c52974fc12ea61aa5c6ca1 (diff) | |
hide-threads.js: fix working with ukko
Diffstat (limited to 'js')
| -rw-r--r-- | js/hide-threads.js | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/js/hide-threads.js b/js/hide-threads.js index 5a9908f1..c9ace8a5 100644 --- a/js/hide-threads.js +++ b/js/hide-threads.js @@ -12,11 +12,9 @@ */ $(document).ready(function(){ - if($('div.banner').length != 0) + if (active_page != "index" && active_page != "ukko") return; // not index - - var board = $('form input[name="board"]').val().toString(); - + if (!localStorage.hiddenthreads) localStorage.hiddenthreads = '{}'; @@ -37,13 +35,15 @@ $(document).ready(function(){ } } - if (!hidden_data[board]) { - hidden_data[board] = {}; // id : timestamp - } - $('div.post.op').each(function() { var id = $(this).children('p.intro').children('a.post_no:eq(1)').text(); var thread_container = $(this).parent(); + var board = thread_container.data("board"); + + if (!hidden_data[board]) { + hidden_data[board] = {}; // id : timestamp + } + $('<a class="hide-thread-link" style="float:left;margin-right:5px" href="javascript:void(0)">[–]</a><span> </span>') .insertBefore(thread_container.find('p.fileinfo:first')) .click(function() { |
