A few small consistency cleanups

This commit is contained in:
Junior 2026-11-08 15:47:57 -05:00
parent 0988f1df2a
commit 7b186c1898

View File

@ -1,5 +1,5 @@
const NOREFRESH = false;
var folderRequest = false;
let folderRequest = false;
let lightbox = null;
toastr.options.escapeHtml = true;
// This function is executed after the page load completes on the client
@ -16,8 +16,6 @@ $(document).ready(function() {
getSortOrder();
});
var lightbox = null;
/**
* Redirects the user to the login page by replacing the current location with "index.php".
* Logs a message to the console before redirecting.
@ -39,10 +37,9 @@ function getSortOrder(refresh = true) {
if ( !data.validated ) {
redirectToLogin();
return;
} else {
$("#sortorder").html(data.order);
if ( refresh ) getFolderContents();
}
$("#sortorder").html(data.order);
if ( refresh ) getFolderContents();
},
error : function(xhr, stat, err) {
toastr.error("There was an error retrieving the current sort order.", "API Error...", {timeOut: 15000});
@ -161,7 +158,7 @@ function changeFolder(path) {
* @returns {void}
*/
function updateCurrentPage() {
var currentPage = lightbox.currentPosition;
let currentPage = lightbox.currentPosition;
$.ajax({
url : 'ajax/setpage.php',
type : 'POST',
@ -222,7 +219,7 @@ function showComic(comic, name) {
return;
}
toastr.remove();
if ( data.images.length == 0 ) {
if ( data.images.length === 0 ) {
toastr.error("There doesn't seem to be any images in this comic. Please contact the admin!", "Comics is empty", {timeOut: 8000});
return;
}