mirror of
https://github.com/vichan-devel/vichan.git
synced 2024-11-24 07:30:10 +01:00
watch.js + hide-threads.js integration; fixes vichan-devel#40
This commit is contained in:
parent
808a5ab8f6
commit
eaef338dce
17
js/watch.js
17
js/watch.js
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user