From fc8c843e84cd450eb03c88ca792a52791fb04e74 Mon Sep 17 00:00:00 2001 From: bordun Date: Mon, 10 May 2021 20:26:35 +0200 Subject: [PATCH] scripting: expose `console.clear()` --- CHANGELOG.md | 5 +++++ src/client/ui/ui-console.js | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index bb745046..a87abf2f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +## next + +- scripting + - expose `console.clear()` + ## 1.9.7 - bug fixes diff --git a/src/client/ui/ui-console.js b/src/client/ui/ui-console.js index 9fac72d2..8892cd63 100644 --- a/src/client/ui/ui-console.js +++ b/src/client/ui/ui-console.js @@ -51,6 +51,11 @@ class UiConsole extends UiSidePanel { console._error(...arguments) } + console._clear = console.clear + console.clear = function(){ + _this.clear() + console._clear() + } this.script = new Script({props:{ id: 'CONSOLE',