You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
769 B
29 lines
769 B
<label for="statusbox">
|
|
<h2>Status:</h2>
|
|
</label>
|
|
<div id="statusbox" contenteditable="false" spellcheck="false" aria-multiline="true" aria-live="polite">
|
|
Welcome!<br>
|
|
</div>
|
|
<label for="logbox">
|
|
<h2>Game Log:</h2>
|
|
</label>
|
|
<div id="logbox" contenteditable="false" spellcheck="false" aria-multiline="true">
|
|
Welcome!<br>
|
|
</div>
|
|
<script>
|
|
const LOG_BOX = document.getElementById("logbox");
|
|
const STATUS_BOX = document.getElementById("statusbox");
|
|
|
|
const write_message = (mess) => {
|
|
LOG_BOX.innerHTML += mess + "<br>";
|
|
LOG_BOX.scrollTop = STATUS_BOX.scrollHeight;
|
|
STATUS_BOX.innerHTML = mess;
|
|
}
|
|
const clear_statusbox = () => {
|
|
LOG_BOX.innerHTML = '';
|
|
STATUS_BOX.innerHTML = mess;
|
|
write_message('<i>Status Cleared</i>');
|
|
}
|
|
|
|
</script>
|