From 79b6e6c72ff4d18352bf1844dbd3526b5f89f802 Mon Sep 17 00:00:00 2001 From: wholelotofhs Date: Wed, 7 Jan 2015 00:01:24 -0500 Subject: [PATCH] forgot ':last' --- js/hide-threads.js | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/js/hide-threads.js b/js/hide-threads.js index 55d29f10..783b7bec 100644 --- a/js/hide-threads.js +++ b/js/hide-threads.js @@ -84,23 +84,24 @@ $(document).ready(function(){ var board = post.parent().data('board'); $('[–]') - .insertAfter($(this).children('p.intro').children('a.post_no')) + .insertAfter($(this).children('p.intro').children('a.post_no:last')) .click(function() { hidden_data[board][id] = Math.round(Date.now() / 1000); store_data(); - var hide_link = $(this) - post.children('div').hide() - hide_link.hide() + var hide_link = $(this); + post.children('div').hide(); + hide_link.hide(); $('[+]') - .insertAfter($(this).children('p.intro').children('a.post_no')) + .insertAfter($(this).children('p.intro').children('a.post_no:last')) .click(function() { delete hidden_data[board][id]; store_data(); post.children('div').show(); + hide_link.show(); $(this).remove(); - hide_link.show() + }); - }) + }); if (hidden_data[board][id]) post.find('.post-hide-link').click(); } @@ -112,6 +113,6 @@ $(document).ready(function(){ do_hide_threads.call($(post).find('div.post.op')[0]); if($(post).is('div.post.reply')) { $(post).each(do_hide_posts); - } + }; }); });