Add fade
This commit is contained in:
parent
82e90f876b
commit
5412039f8e
2 changed files with 14 additions and 5 deletions
|
@ -8,7 +8,7 @@
|
|||
body {
|
||||
font-family: sans-serif;
|
||||
}
|
||||
|
||||
|
||||
.hide {
|
||||
display: none;
|
||||
}
|
||||
|
@ -40,6 +40,15 @@
|
|||
text-align: left;
|
||||
}
|
||||
|
||||
@keyframes fadein {
|
||||
from { opacity: 0; }
|
||||
to { opacity: 1; }
|
||||
}
|
||||
|
||||
.fade {
|
||||
animation: fadein 0.5s;
|
||||
}
|
||||
|
||||
tr:hover {
|
||||
background-color: #aaa;
|
||||
}
|
||||
|
@ -78,10 +87,10 @@
|
|||
|
||||
<body>
|
||||
<button onclick="toggle_logging()" id="toggle_button">Start</button>
|
||||
|
||||
|
||||
<input type="checkbox" id="show_raw" name="show_raw" checked autocomplete="off" onchange="updateShow()">
|
||||
<label for="show_raw">Show raw address and payload</label>
|
||||
|
||||
|
||||
<table id="message_table">
|
||||
<tr>
|
||||
<th>Human-readable type</th>
|
||||
|
|
|
@ -26,9 +26,10 @@ function updateMessages() {
|
|||
response.json().then(function(data) {
|
||||
if (data.length > maxseen) {
|
||||
let messageTable = document.getElementById('message_table');
|
||||
|
||||
|
||||
for (let i = maxseen; i < data.length; i++) {
|
||||
let row = messageTable.insertRow(1);
|
||||
row.classList.add("fade");
|
||||
let current = data[i];
|
||||
|
||||
let human_readable_type = row.insertCell(0)
|
||||
|
@ -83,4 +84,3 @@ function toggle_logging() {
|
|||
clearInterval(updaterID);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue