blob: 64ff726a34922c972d7f277ac0891710e7658f17 (
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
|
<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>
|