1
0
mirror of https://github.com/vichan-devel/vichan.git synced 2025-01-19 09:27:24 +01:00
This commit is contained in:
8chan 2014-10-07 15:18:19 +00:00
commit a195a07d92
2 changed files with 8 additions and 8 deletions

View File

@ -37,7 +37,7 @@ $(document).ready(function(){
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' checked> Auto) <span id='update_secs'></span></span>");
$('.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' checked> "+_("Auto")+") <span id='update_secs'></span></span>");
// Grab the settings
var settings = new script_settings('auto-reload');
@ -145,7 +145,7 @@ $(document).ready(function(){
var poll = function(manualUpdate) {
stop_auto_update();
$('#update_secs').text("Updating...");
$('#update_secs').text(_("Updating..."));
$.ajax({
url: document.location,
@ -188,15 +188,15 @@ $(document).ready(function(){
} else {
// Decide the message to show if auto update is disabled
if (loaded_posts > 0)
$('#update_secs').text("Thread updated with "+loaded_posts+" new post(s)");
$('#update_secs').text(fmt(_("Thread updated with {0} new post(s)"), [loaded_posts]));
else
$('#update_secs').text("No new posts found");
$('#update_secs').text(_("No new posts found"));
}
},
error: function(xhr, status_text, error_text) {
if (status_text == "error") {
if (error_text == "Not Found") {
$('#update_secs').text("Thread deleted or pruned");
$('#update_secs').text(_("Thread deleted or pruned"));
$('#auto_update_status').prop('checked', false);
$('#auto_update_status').prop('disabled', true); // disable updates if thread is deleted
return;
@ -204,9 +204,9 @@ $(document).ready(function(){
$('#update_secs').text("Error: "+error_text);
}
} else if (status_text) {
$('#update_secs').text("Error: "+status_text);
$('#update_secs').text(_("Error: ")+status_text);
} else {
$('#update_secs').text("Unknown error");
$('#update_secs').text(_("Unknown error"));
}
// Keep trying to update

View File

@ -9,7 +9,7 @@ function handle_boards(data) {
})
if (boards[0]) {
$('.favorite-boards').before(' [ '+boards.slice(0,15).join(" / ")+' ] ');
$('.favorite-boards').before('<span class="sub" data-description="3"> [ '+boards.slice(0,15).join(" / ")+' ] </span>');
}
}