moved log function

This commit is contained in:
matt 2023-08-05 19:55:21 +02:00
parent 27823402dc
commit 4ba14f36fb
3 changed files with 11 additions and 10 deletions

View File

@ -275,8 +275,8 @@
<!-- Core plugin JavaScript-->
<!-- Patcher JavaScript -->
<script src="js/console.js"></script>
<script src="js/fwpack.js"></script>
<script src="js/qsflash.js"></script>
<script src="js/modframework.js"></script>
<script src="mods.js"></script>
<script src="js/init.js"></script>

View File

@ -1,9 +0,0 @@
function log(message) {
const consoleArea = document.getElementById('console');
// Append the new message to the existing content and add a newline
consoleArea.value += message + '\n';
// Scroll to the bottom to show the latest message
consoleArea.scrollTop = consoleArea.scrollHeight;
}

View File

@ -118,6 +118,16 @@ function applyMods(firmware) {
return firmware;
}
function log(message) {
const consoleArea = document.getElementById('console');
// Append the new message to the existing content and add a newline
consoleArea.value += message + '\n';
// Scroll to the bottom to show the latest message
consoleArea.scrollTop = consoleArea.scrollHeight;
}
// Helper functions: