summaryrefslogtreecommitdiffstats
path: root/dat
diff options
context:
space:
mode:
authorNeil Moore <neil@s-z.org>2012-06-27 01:44:24 -0500
committerNeil Moore <neil@s-z.org>2012-06-27 01:44:24 -0500
commite3c516e54f13188862055c18729dbf328d2f79eb (patch)
tree1073048da9f8d670601b2025b0e31f5f2a92e7fd /dat
parente3da4842d2eb6d4c851ac008d5220bbddd87ad08 (diff)
downloadcrawlbot-e3c516e54f13188862055c18729dbf328d2f79eb.tar.gz
crawlbot-e3c516e54f13188862055c18729dbf328d2f79eb.zip
Format per-day headers in search results.
Diffstat (limited to 'dat')
-rw-r--r--dat/log/.logview.shtml6
1 files changed, 5 insertions, 1 deletions
diff --git a/dat/log/.logview.shtml b/dat/log/.logview.shtml
index 7d37f4a..6cc5308 100644
--- a/dat/log/.logview.shtml
+++ b/dat/log/.logview.shtml
@@ -23,7 +23,10 @@ wensley = function(logurl, args) {
// Ugh: try to handle colour and bold tags.
data = data.replace(/\cC(?:0(\d)|([1-9]\d?))(?:,(?:0(\d)|([1-9]\d?)))?([^\cC\cO\n]*\cO?)/g, '<span class="fg$1$2 bg$3$4">$5</span>');
data = data.replace(/\cB([^\cB\cO\n]*)\cO?/g, '<b>$1</b>');
- data = data.replace(/\cO/g, '');
+ data = data.replace(/\cO/g, '');
+
+ // Search headers
+ data = data.replace(/(\d+ match(?:es)? in )##(.*):/g, '<h3>$1<a onclick="wensley(\'%23%23$2\', {})" href="#">##$2</a>:</h3>');
data = data.replace(/\n/g, "<br>");
$('div#stuff').html('<h2>Wensley is so awesome</h2><a href="#files">Jump to list of logs</a> | <a href="#" onclick="wensleyclear()">Close log</a><div class="irc">' + data + '</div>');
@@ -31,6 +34,7 @@ wensley = function(logurl, args) {
}
</script>
<style type="text/css">
+ h3 { margin-bottom: 0em; }
.irc { font-family: monospace; }
.fg0 { color: white; }
.fg1 { color: black; }