Skip to content
Snippets Groups Projects
Commit b118f213 authored by echicken's avatar echicken
Browse files

Try this shit. A web-based oneliners lister. Can be used as an ecweb sidebar...

Try this shit. A web-based oneliners lister. Can be used as an ecweb sidebar module, or possibly shoehorned into your nightshade-themed stock syncweb.
parent fff94f7b
Branches
Tags
No related merge requests found
<?xjs
var show = 5;
var lines = [];
try {
load(system.exec_dir + "../xtrn/oneliners/lib.js");
var settings = initSettings(system.exec_dir + "../xtrn/oneliners/");
var oneliners = new Oneliners(settings.server, settings.port);
var count = oneliners.count;
lines = (count < show) ? oneliners.read(0) : oneliners.read(0 - count);
oneliners.close();
} catch(err) {
log(LOG_ERR, err);
}
?>
Synchronet Oneliners<br><br>
<?xjs
for(var line = 0; line < lines.length; line++) {
var bg = (line %2 == 0) ? "#1C1C1C" : "#585858";
var fg = (line %2 == 0) ? "#FFFFFF" : "#000000";
write("<div style='width:100%;color:"+fg+";background-color:"+bg+";'>");
write(lines[line].alias + "@" + lines[line].qwkid + "<br>");
write(system.timestr(lines[line].time) + "<br>");
write(lines[line].oneliner.replace(/\|\d\d|\1\w/g, "") + "<br>");
write("</div>");
}
?>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment