From 76ad8325670301579b089755390370eec719f50a Mon Sep 17 00:00:00 2001 From: towards-a-new-leftypol Date: Tue, 27 Feb 2024 15:49:13 -0500 Subject: [PATCH] Remove console.log implementation that renders to the page from utils (was there to debug mobile) --- js/lcn/utils.js | 40 ---------------------------------------- 1 file changed, 40 deletions(-) diff --git a/js/lcn/utils.js b/js/lcn/utils.js index 7246bdf6..9485656b 100644 --- a/js/lcn/utils.js +++ b/js/lcn/utils.js @@ -11,46 +11,6 @@ function cont(value_to_test, fn) { } } -function text(s) { - return document.createTextNode(s); -} - -function prepend(elem, children) { - var child = elem.firstChild; - - if (child) { - elem.insertBefore(children, child); - } else { - elem.appendChild(children); - } -} - - -function _log() { - for (var arg of arguments) { - if (arg == null) { - continue; - } - - var pre = document.createElement('pre'); - pre.appendChild(text(arg.toString())); - document.body.appendChild(pre); - try { - prepend(document.body, pre); - } catch (e) { - var pre = document.createElement('pre'); - pre.appendChild(text(e.toString())); - document.body.appendChild(pre); - } - - } -} - -var console = { - log: _log, - error: _log -}; - const assert = { "equal": (actual, expected, message="No message set") => { if (actual !== expected) {