blob: 67cb5c954449b641eabe715d5673fb15c01fc11a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
var hidden = false;
function hideOffline() {
hidden = !hidden;
var playerboxes = document.querySelectorAll('div.Offline');
for(index in playerboxes) /* Show/Hide player row */
{
if(typeof playerboxes[index] != 'object') continue;
playerboxes[index].style.display = (hidden) ? 'none' : 'inline-block';
}
/* And update the text on our button. */
document.querySelector('#offlinetoggle').innerHTML = (hidden) ? 'Show Offline' : 'Hide Offline';
}
/* Execute function on page load. */
setTimeout(hideOffline, 1);
// vim: commentstring=/*\ %s\ */
|