From 1a78c609dcf59a8400662186d260cdc9bd28ae61 Mon Sep 17 00:00:00 2001 From: IgorA100 Date: Wed, 17 Jul 2024 11:57:37 +0300 Subject: [PATCH 1/2] Chore: Code optimization (skin.js) You should not call "console.log" again, because if you put a comma, the object will be displayed on a new console line. --- web/skins/classic/js/skin.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/web/skins/classic/js/skin.js b/web/skins/classic/js/skin.js index 7957dac8dd..4fcbd346b0 100644 --- a/web/skins/classic/js/skin.js +++ b/web/skins/classic/js/skin.js @@ -943,8 +943,7 @@ function stateStuff(action, runState, newState) { function logAjaxFail(jqxhr, textStatus, error) { console.log("Request Failed: " + textStatus + ", " + error); if ( ! jqxhr.responseText ) { - console.log("Ajax request failed. No responseText. jqxhr follows:"); - console.log(jqxhr); + console.log("Ajax request failed. No responseText. jqxhr follows:", jqxhr); return; } var responseText = jqxhr.responseText.replace(/(<([^>]+)>)/gi, '').trim(); // strip any html or whitespace from the response From b8ca4f236956b265a651357073c2b42acd511d52 Mon Sep 17 00:00:00 2001 From: IgorA100 Date: Fri, 19 Jul 2024 14:11:28 +0300 Subject: [PATCH 2/2] Update skin.js --- web/skins/classic/js/skin.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/skins/classic/js/skin.js b/web/skins/classic/js/skin.js index 4fcbd346b0..660ad1be55 100644 --- a/web/skins/classic/js/skin.js +++ b/web/skins/classic/js/skin.js @@ -943,7 +943,7 @@ function stateStuff(action, runState, newState) { function logAjaxFail(jqxhr, textStatus, error) { console.log("Request Failed: " + textStatus + ", " + error); if ( ! jqxhr.responseText ) { - console.log("Ajax request failed. No responseText. jqxhr follows:", jqxhr); + console.log("Ajax request failed. No responseText. jqxhr follows:\n", jqxhr); return; } var responseText = jqxhr.responseText.replace(/(<([^>]+)>)/gi, '').trim(); // strip any html or whitespace from the response