summaryrefslogtreecommitdiff
path: root/js/hide-threads.js
diff options
context:
space:
mode:
authorczaks <marcin@6irc.net>2014-04-19 00:24:52 +0200
committerczaks <marcin@6irc.net>2014-04-19 00:24:52 +0200
commitbfc4df8276f1f3577e8d40f300ed0f3f02613cd0 (patch)
treeff3a2e0d49a9c3d8058aa46df600d2b6eac674f2 /js/hide-threads.js
parent5b9b0abc54d2aa7f632909ecdfeb11862dffb9ae (diff)
parentbd498227f5faebad7058efeae1f7badc469d7a0e (diff)
Merge branch 'master' of github.com:vichan-devel/Tinyboard into br-integration
Diffstat (limited to 'js/hide-threads.js')
-rw-r--r--js/hide-threads.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/js/hide-threads.js b/js/hide-threads.js
index 750d06a2..b26feca3 100644
--- a/js/hide-threads.js
+++ b/js/hide-threads.js
@@ -35,6 +35,8 @@ $(document).ready(function(){
}
}
}
+
+ var fields_to_hide = 'div.post,div.video-container,video,img,p.fileinfo,a.hide-thread-link,br';
var do_hide_threads = function() {
var id = $(this).children('p.intro').children('a.post_no:eq(1)').text();
@@ -52,7 +54,7 @@ $(document).ready(function(){
hidden_data[board][id] = Math.round(Date.now() / 1000);
store_data();
- thread_container.find('div.post,div.video-container,img,p.fileinfo,a.hide-thread-link,br').hide();
+ thread_container.find(fields_to_hide).hide();
var hidden_div = thread_container.find('div.post.op > p.intro').clone();
hidden_div.addClass('thread-hidden');
@@ -65,7 +67,8 @@ $(document).ready(function(){
.click(function() {
delete hidden_data[board][id];
store_data();
- thread_container.find('div.post,div.video-container,img,p.fileinfo,a.hide-thread-link,br').show();
+ thread_container.find(fields_to_hide).show();
+ thread_container.find(".hidden").hide();
$(this).remove();
hidden_div.remove();
});