<?xml version="1.0" encoding="UTF-8"?>
<post>
  <body>Here's some things for the end-user to change to add a bit of functionality to the script.

This highlights new posts, with different colors according to what time they were posted.
Change &lt;code&gt;function random_color&lt;/code&gt; to this, and &lt;code&gt;const HIGHLIGHT_NEW_POSTS&lt;/code&gt; to true

&lt;code&gt;function random_color() {
    d = new Date();
    h = d.getHours();
    m = d.getMinutes();
    s = d.getSeconds();
    if (h&amp;lt;10) { h = '0' + h ;}
    if (m&amp;lt;10) { m = '0' + m ;}
    if (s&amp;lt;10) { s = '0' + s ;}
    return '#' + h + m + s
}&lt;/code&gt;

This part changes the title of the page to the number of new replies, so you can see if there are new posts from another tab.
add
&lt;code&gt;var i = 0;&lt;/code&gt;
when it's setting all the other vars, and add
&lt;code&gt;i++;
document.title = i&lt;/code&gt;
under
&lt;code&gt;if (HIGHLIGHT_NEW_POSTS) {&lt;/code&gt;</body>
  <body-html>&lt;p&gt;Here's some things for the end-user to change to add a bit of functionality to the script.&lt;/p&gt;

&lt;p&gt;This highlights new posts, with different colors according to what time they were posted.
&lt;br /&gt;Change &lt;code&gt;function random_color&lt;/code&gt; to this, and &lt;code&gt;const HIGHLIGHT_NEW_POSTS&lt;/code&gt; to true&lt;/p&gt;

&lt;p&gt;&lt;code&gt;function random_color() {
&lt;br /&gt;    d = new Date();
&lt;br /&gt;    h = d.getHours();
&lt;br /&gt;    m = d.getMinutes();
&lt;br /&gt;    s = d.getSeconds();
&lt;br /&gt;    if (h&amp;lt;10) { h = '0' + h ;}
&lt;br /&gt;    if (m&amp;lt;10) { m = '0' + m ;}
&lt;br /&gt;    if (s&amp;lt;10) { s = '0' + s ;}
&lt;br /&gt;    return '#' + h + m + s
&lt;br /&gt;}&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;This part changes the title of the page to the number of new replies, so you can see if there are new posts from another tab.
&lt;br /&gt;add
&lt;br /&gt;&lt;code&gt;var i = 0;&lt;/code&gt;
&lt;br /&gt;when it's setting all the other vars, and add
&lt;br /&gt;&lt;code&gt;i++;
&lt;br /&gt;document.title = i&lt;/code&gt;
&lt;br /&gt;under
&lt;br /&gt;&lt;code&gt;if (HIGHLIGHT_NEW_POSTS) {&lt;/code&gt;&lt;/p&gt;</body-html>
  <created-at type="datetime">2009-07-31T18:00:14Z</created-at>
  <forumable-id type="integer">38840</forumable-id>
  <forumable-type>Script</forumable-type>
  <id type="integer">152936</id>
  <topic-id type="integer">31893</topic-id>
  <updated-at type="datetime">2009-07-31T18:04:59Z</updated-at>
  <user-agent>Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1.1) Gecko/20090715 Firefox/3.5.1</user-agent>
  <user-id type="integer">101913</user-id>
</post>
