mirror of
https://github.com/vichan-devel/vichan.git
synced 2025-01-31 12:23:48 +01:00
Merge pull request #419 from marktaiwan/auto-upda
Bugfix: auto update option
This commit is contained in:
commit
37fea8ec9b
@ -28,16 +28,6 @@ function makeIcon(){
|
||||
}
|
||||
|
||||
$(document).ready(function(){
|
||||
if($('div.banner').length == 0)
|
||||
return; // not index
|
||||
|
||||
if($(".post.op").size() != 1)
|
||||
return; //not thread page
|
||||
|
||||
var countdown_interval;
|
||||
|
||||
// Add an update link
|
||||
$('.boardlist.bottom').prev().after("<span id='updater'><a href='#' id='update_thread' style='padding-left:10px'>["+_("Update")+"]</a> (<input type='checkbox' id='auto_update_status'> "+_("Auto")+") <span id='update_secs'></span></span>");
|
||||
|
||||
// Adds Options panel item
|
||||
if (typeof localStorage.auto_thread_update === 'undefined') {
|
||||
@ -53,10 +43,19 @@ $(document).ready(function(){
|
||||
}
|
||||
});
|
||||
if (localStorage.auto_thread_update === 'true') {
|
||||
$('#show-relative-time>input').prop('checked', true);
|
||||
$('#auto-thread-update>input').prop('checked', true);
|
||||
}
|
||||
}
|
||||
|
||||
// not thread
|
||||
if (active_page != 'thread')
|
||||
return;
|
||||
|
||||
var countdown_interval;
|
||||
|
||||
// Add an update link
|
||||
$('.boardlist.bottom').prev().after("<span id='updater'><a href='#' id='update_thread' style='padding-left:10px'>["+_("Update")+"]</a> (<input type='checkbox' id='auto_update_status'> "+_("Auto")+") <span id='update_secs'></span></span>");
|
||||
|
||||
// Set the updater checkbox according to user setting
|
||||
if (localStorage.auto_thread_update === 'true') {
|
||||
$('#auto_update_status').prop('checked', true);
|
||||
|
Loading…
x
Reference in New Issue
Block a user