4shadow

By tkirby Last update Feb 8, 2009 — Installed 4,169 times.

Here's some improvements

in
Subscribe to Here's some improvements 2 posts, 2 voices



thisisanon User
FirefoxMacintosh

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 function random_color to this, and const HIGHLIGHT_NEW_POSTS to true

function random_color() {
d = new Date();
h = d.getHours();
m = d.getMinutes();
s = d.getSeconds();
if (h<10) { h = '0' + h ;}
if (m<10) { m = '0' + m ;}
if (s<10) { s = '0' + s ;}
return '#' + h + m + s
}

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
var i = 0;
when it's setting all the other vars, and add
i++;
document.title = i

under
if (HIGHLIGHT_NEW_POSTS) {

 
Symmetry User
FirefoxWindows

Is there any way to make the "new posts" count reset and/or un-highlight when you visit a page?

Cross
Presentational HTML allowed.
Use <code> for inline code and <pre> for code blocks. Use &lt; and &gt; for literal < and >.
We help break paragraphs and link your links.
or cancel