fixed srclink

This commit is contained in:
Flummi 2016-09-01 07:56:53 +00:00
parent a497d65395
commit 8f708f8819
3 changed files with 7 additions and 2 deletions

1
bot.js
View File

@ -46,6 +46,7 @@ child.on('start', () => {
});
child.on('exit:code', (code) => {
putlog('detected bot exited with code ' + code + '\n');
child.restart();
});
child.on('stderr', (data) => {
putlog(data);

View File

@ -21,7 +21,7 @@
</div>
<div class="controls">{% if next != null %}<a id="next" href="/{{ next }}"><<-</a> | {% endif %} <a id="random" href="/random" title="Random">random</a> {% if prev != null %} | <a id="prev" href="/{{ prev }}">->></a>{% endif %}</div><br />
<div class="info">
<span class="src">src: <a href="{{ src }}" target="_blank">{{ src }}</a></span><br />
<span class="src">src: <a href="{{ srcurl }}" target="_blank">{{ src }}</a></span><br />
<span class="dest">dest: {{ dest }}</span><br />
<span class="mime">mime: {{ mime }}</span>&nbsp;
<span class="size">size: {{ size }}</span><br />

View File

@ -2,6 +2,7 @@ var fs = require('fs-extra');
var http = require('http');
var path = require('path');
var swig = require('swig');
var urlm = require('url');
var cfg = require('../cfg/websrv.json');
var templates = {};
@ -89,7 +90,10 @@ function Websrv(tbot, tsql, tlib) {
}
data.id = e.id;
data.username = e.username;
data.src = e.src;
data.srcurl = e.src;
data.src = urlm.parse(e.src).hostname;
data.dest = e.dest;
data.mime = e.mime;
data.size = lib.formatSize(e.size);