blob: a70d9f4b67f8db3eb0208e7f232c22062f363251 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
<!-- $Id$ -->
<html>
<head>
<title>Redirector Log Message Listener
<style type="text/css">
body { font-family:Arial, sans-serif; }
</style>
</head>
<body onunload="unload();" onload="load();">
<script>
var listener = {
observe : function(msg) {
var prefix = 'REDIRECTOR:';
if (msg.message.substr(0, prefix.length) == prefix)
{
document.body.innerHTML += msg.message.substr(prefix.length) + '<br>';
}
}
};
var consoleService = Components.classes["@mozilla.org/consoleservice;1"].getService(Components.interfaces.nsIConsoleService);
function load() {
consoleService.registerListener(listener);
}
function unload() {
consoleService.unregisterListener(listener);
}
</script>
</body>
</html>
|