1
0
mirror of https://github.com/vichan-devel/vichan.git synced 2024-11-23 23:20:57 +01:00

watch.js + hide-threads.js integration; fixes vichan-devel#40

This commit is contained in:
czaks 2014-01-26 18:57:22 +01:00
parent 808a5ab8f6
commit eaef338dce

View File

@ -11,6 +11,7 @@
* $config['additional_javascript'][] = 'js/mobile-style.js';
* //$config['additional_javascript'][] = 'js/titlebar-notifications.js';
* //$config['additional_javascript'][] = 'js/auto-reload.js';
* //$config['additional_javascript'][] = 'js/hide-threads.js';
* //$config['additional_javascript'][] = 'js/compact-boardlist.js';
* $config['additional_javascript'][] = 'js/watch.js';
*
@ -265,10 +266,26 @@ $(function(){
var new_threads = 0;
var hidden_data = {};
if (localStorage.hiddenthreads) {
hidden_data = JSON.parse(localStorage.hiddenthreads);
}
for (var i in json) {
for (var j in json[i].threads) {
var thread = json[i].threads[j];
if (hidden_data[board]) { // hide threads integration
var cont = false;
for (var k in hidden_data[board]) {
if (parseInt(k) == thread.no) {
cont = true;
break;
}
}
if (cont) continue;
}
if (thread.last_modified > storage()[board].watched / 1000) {
last_thread = thread.no;