From 3636d3e9357960f2dfd9b17da917d183db968427 Mon Sep 17 00:00:00 2001 From: tdro Date: Wed, 6 Dec 2023 16:36:24 -0500 Subject: static/js: Organize console filters Info, warning, and errors --- assets/js/index.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'assets/js') diff --git a/assets/js/index.js b/assets/js/index.js index b0f2f84..8eae4fb 100644 --- a/assets/js/index.js +++ b/assets/js/index.js @@ -3,7 +3,7 @@ if (cookiesDisabled) { document.cookie = "disabled"; document.cookie.indexOf("disabled"); - return console.log("Pager is disabled due to cookie restrictions."); + return console.warn("WARNING: Pager disabled due to cookie restrictions"); } let seek; let settings = { @@ -115,10 +115,10 @@ indicator.removeAttribute("id"); indicator.dataset.update = "refresh"; self.removeEventListener("blur", update); - console.log("R: " + remote); - console.log("L: " + local); - console.log("D: " + drift); - console.log("M: " + modified); + console.log("INFO: R: " + remote); + console.log("INFO: L: " + local); + console.log("INFO: D: " + drift); + console.log("INFO: M: " + modified); } }); } @@ -548,7 +548,7 @@ }); search(query.value, data.items, options); }).catch(function(error) { - console.log("Error failed to load fuzzy sort: " + error); + console.error("ERROR: Failed to load fuzzy search", error); }); } } @@ -739,7 +739,7 @@ } } } catch (error) { - console.error("Error: Unable to resolve relative time format!", error); + console.error("ERROR: Relative time resolution failed", error); } })(elements[i1]); } @@ -757,4 +757,4 @@ }, 1000); }); })(); -console.log("Surface Control: Complete"); \ No newline at end of file +console.log("INFO: Surface Control Complete"); \ No newline at end of file -- cgit v1.2.3