aboutsummaryrefslogtreecommitdiff
path: root/src/modules/console.js
diff options
context:
space:
mode:
author0neGal <mail@0negal.com>2023-07-24 17:48:07 +0200
committerGitHub <noreply@github.com>2023-07-24 17:48:07 +0200
commit306e09311b681afecdf2f1063a10ad87e63f5b7a (patch)
treed8905b4c651cf762c46f595879751d4334cdb893 /src/modules/console.js
parentd69162ff55b83c8bfe8f855b74785038c4662051 (diff)
parent11f2bc2de10e5ec7bb8a8b102855e9b7f0122c02 (diff)
downloadViper-306e09311b681afecdf2f1063a10ad87e63f5b7a.tar.gz
Viper-306e09311b681afecdf2f1063a10ad87e63f5b7a.zip
Merge branch 'main' into add-missing-localizations
Diffstat (limited to 'src/modules/console.js')
-rw-r--r--src/modules/console.js27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/modules/console.js b/src/modules/console.js
new file mode 100644
index 0000000..7112071
--- /dev/null
+++ b/src/modules/console.js
@@ -0,0 +1,27 @@
+let new_console = {
+ ...console
+}
+
+let orig_console = console;
+
+new_console.ok = (...args) => {
+ orig_console.log('\x1b[92m%s\x1b[0m', ...args)
+}
+
+new_console.misc = (...args) => {
+ orig_console.warn('\x1b[90m%s\x1b[0m', ...args)
+}
+
+new_console.info = (...args) => {
+ orig_console.warn('\x1b[94m%s\x1b[0m', ...args)
+}
+
+new_console.warn = (...args) => {
+ orig_console.warn('\x1b[93m%s\x1b[0m', ...args)
+}
+
+new_console.error = (...args) => {
+ orig_console.error('\x1b[91m%s\x1b[0m', ...args)
+}
+
+module.exports = new_console;