1
0
mirror of https://github.com/vichan-devel/vichan.git synced 2025-02-22 05:29:34 +01:00

Always displays the options panel item

This commit is contained in:
marktaiwan 2015-03-08 09:57:49 +08:00
parent ecd2616ae8
commit 5ccdaf3b0d

View File

@ -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') {
@ -57,6 +47,15 @@ $(document).ready(function(){
}
}
// 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);