Skip to content
Snippets Groups Projects
Commit 8e441dc6 authored by echicken's avatar echicken :chicken:
Browse files

Use var for server-side stuff. Formatting.

parent 4372b80e
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
<?xjs <?xjs
const logonlist_lib = load({}, 'logonlist_lib.js'); var logonlist_lib = load({}, 'logonlist_lib.js');
const options = load("modopts.js", "logonlist") || {}; var options = load("modopts.js", "logonlist") || {};
if (options.last_few_callers === undefined) options.last_few_callers = 4; if (options.last_few_callers === undefined) options.last_few_callers = 4;
const ll = logonlist_lib.get(-options.last_few_callers); var ll = logonlist_lib.get(-options.last_few_callers);
if (Array.isArray(ll)) { if (!Array.isArray(ll)) exit();
?> ?>
<h4><? locale.write('label_title', 'sidebar_recent_visitors'); ?></h4> <h4>
<ul class="list-group"> <? locale.write('label_title', 'sidebar_recent_visitors'); ?>
<?xjs ll.reverse().forEach(function (e) { ?> </h4>
<li class="list-group-item striped"> <ul class="list-group">
<strong><? write(e.user.alias); ?></strong> <? ll.reverse().forEach(function (e) { ?>
<br> <li class="list-group-item striped">
<em><? write(new Date(e.time * 1000).toLocaleString()); ?></em> <strong>
<br> <? write(e.user.alias); ?>
<?xjs if (e.user.location != '') { ?> </strong>
<? locale.write('label_location', 'sidebar_recent_visitors'); ?> <br>
<strong><? write(e.user.location); ?></strong> <em>
<?xjs } ?> <? write(new Date(e.time * 1000).toLocaleString()); ?>
<? locale.write('label_connection', 'sidebar_recent_visitors'); ?> </em>
<strong><? write(e.user.connection); ?></strong> <br>
</li> <? if (e.user.location != '') { ?>
<?xjs }); ?> <? locale.write('label_location', 'sidebar_recent_visitors'); ?>
</ul> <strong>
<? write(e.user.location); ?>
<?xjs } ?> </strong>
<? } ?>
<? locale.write('label_connection', 'sidebar_recent_visitors'); ?>
<strong>
<? write(e.user.connection); ?>
</strong>
</li>
<? }); ?>
</ul>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment