hide-threads.js + containerchan integration
This commit is contained in:
parent
ae4cf699c8
commit
c4317cdbf7
@ -36,6 +36,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 do_hide_threads = function() {
|
||||||
var id = $(this).children('p.intro').children('a.post_no:eq(1)').text();
|
var id = $(this).children('p.intro').children('a.post_no:eq(1)').text();
|
||||||
var thread_container = $(this).parent();
|
var thread_container = $(this).parent();
|
||||||
@ -52,7 +54,7 @@ $(document).ready(function(){
|
|||||||
hidden_data[board][id] = Math.round(Date.now() / 1000);
|
hidden_data[board][id] = Math.round(Date.now() / 1000);
|
||||||
store_data();
|
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();
|
var hidden_div = thread_container.find('div.post.op > p.intro').clone();
|
||||||
hidden_div.addClass('thread-hidden');
|
hidden_div.addClass('thread-hidden');
|
||||||
@ -65,7 +67,7 @@ $(document).ready(function(){
|
|||||||
.click(function() {
|
.click(function() {
|
||||||
delete hidden_data[board][id];
|
delete hidden_data[board][id];
|
||||||
store_data();
|
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();
|
||||||
$(this).remove();
|
$(this).remove();
|
||||||
hidden_div.remove();
|
hidden_div.remove();
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user