|
@ -42,24 +42,24 @@ auto_reload_enabled = true; // for watch.js to interop |
|
|
|
|
|
|
|
|
$(document).ready(function(){ |
|
|
$(document).ready(function(){ |
|
|
// Adds Options panel item
|
|
|
// Adds Options panel item
|
|
|
if (typeof localStorage.auto_recent_update === 'undefined') { |
|
|
if (typeof localStorage.auto_recent_update_mod === 'undefined') { |
|
|
localStorage.auto_recent_update = 'true'; //default value
|
|
|
localStorage.auto_recent_update_mod = 'true'; //default value
|
|
|
} |
|
|
} |
|
|
if (window.Options && Options.get_tab('general')) { |
|
|
if (window.Options && Options.get_tab('general')) { |
|
|
Options.extend_tab("general", "<fieldset id='auto-update-fs'><legend>"+_("Auto update (recent)")+"</legend>" |
|
|
Options.extend_tab("general", "<fieldset id='auto-update-fs'><legend>"+_("Auto update (recent)")+"</legend>" |
|
|
+ ('<label id="auto-recent-update"><input type="checkbox">' + _('Auto update recent') + '</label>') |
|
|
+ ('<label id="auto-recent-update-mod"><input type="checkbox">' + _('Auto update recent (mod)') + '</label>') |
|
|
+ ('<label id="auto_recent_desktop_notifications_all"><input type="checkbox">' + _('Show desktop notifications on all replies') + '</label>') |
|
|
+ ('<label id="auto_recent_desktop_notifications_all_mod"><input type="checkbox">' + _('Show desktop notifications on all replies (mod)') + '</label>') |
|
|
+ '</fieldset>'); |
|
|
+ '</fieldset>'); |
|
|
|
|
|
|
|
|
$('#auto-recent-update>input').on('click', function() { |
|
|
$('#auto-recent-update-mod>input').on('click', function() { |
|
|
if ($('#auto-recent-update>input').is(':checked')) { |
|
|
if ($('#auto-recent-update-mod>input').is(':checked')) { |
|
|
localStorage.auto_recent_update = 'true'; |
|
|
localStorage.auto_recent_update_mod = 'true'; |
|
|
} else { |
|
|
} else { |
|
|
localStorage.auto_recent_update = 'false'; |
|
|
localStorage.auto_recent_update_mod = 'false'; |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
$('#auto_recent_desktop_notifications>input,#auto_recent_desktop_notifications_all>input').on('click', function() { |
|
|
$('#auto_recent_desktop_notifications_all_mod>input').on('click', function() { |
|
|
if (!("Notification" in window)) return; |
|
|
if (!("Notification" in window)) return; |
|
|
|
|
|
|
|
|
var setting = $(this).parent().attr('id'); |
|
|
var setting = $(this).parent().attr('id'); |
|
@ -78,12 +78,12 @@ $(document).ready(function(){ |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
if (localStorage.auto_recent_update === 'true') { |
|
|
if (localStorage.auto_recent_update_mod === 'true') { |
|
|
$('#auto-recent-update>input').prop('checked', true); |
|
|
$('#auto-recent-update-mod>input').prop('checked', true); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if (localStorage.auto_recent_desktop_notifications_all === 'true') { |
|
|
if (localStorage.auto_recent_desktop_notifications_all_mod === 'true') { |
|
|
$('#auto_recent_desktop_notifications_all>input').prop('checked', true); |
|
|
$('#auto_recent_desktop_notifications_all_mod>input').prop('checked', true); |
|
|
notify = "all"; |
|
|
notify = "all"; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
@ -94,7 +94,7 @@ $(document).ready(function(){ |
|
|
$(".bar-bottom span:last-child").append("<span id='updater'><a href='#' id='update_thread'>["+_("Update")+"]</a> (<input type='checkbox' id='auto_update_status'> "+_("Auto")+") <span id='update_secs'></span></span>"); |
|
|
$(".bar-bottom span:last-child").append("<span id='updater'><a href='#' id='update_thread'>["+_("Update")+"]</a> (<input type='checkbox' id='auto_update_status'> "+_("Auto")+") <span id='update_secs'></span></span>"); |
|
|
|
|
|
|
|
|
// Set the updater checkbox according to user setting
|
|
|
// Set the updater checkbox according to user setting
|
|
|
if (localStorage.auto_recent_update === 'true') { |
|
|
if (localStorage.auto_recent_update_mod === 'true') { |
|
|
$('#auto_update_status').prop('checked', true); |
|
|
$('#auto_update_status').prop('checked', true); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|