Shortly after I posted this thread, I found version 2.00 of this same script. It is better but has same problem as the version 1.0. Additionally it has some problems showing certain characters, like numbers and commas. I solved that by removing the conversion part of the code, not the best way to do it but at least it works now.
Both versions are available
here.
The problem that is still remaining, is that the script goes idle with the channel. And activates again when there is activity in the channel.
Also, when the script activates again, all messages and events has same timestamp, latest.
This is what the html-page looks like when there has been no activity on the channel for a while.
And this is the modified code of version 2.00.
I'd appreciate any help with this.