in reply to [Free Nodelet Hack] Highlight monk names accordingly their XP level
Hi,
I did a minor change to your script.
I think the used regex matches too many links. Any link, which includes the proper node_id=\d+ is highlighted (saw this on the home node of a highlighted user).
Don't know if this is intentional, or not.
As I wanted only to highlight links which direct to home nodes, I tried a fix and changed the regex from /node_id=(\d+)/ to /\?node_id=(\d+)$/:
if ( /\?node_id=(\d+)$/.test(links[i].href) && SaintsBook[RegExp.$1] )
Maybe it's a fix, maybe not.
May it be helpful to others ;)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: [Free Nodelet Hack] Highlight monk names accordingly their XP level
by ccn (Vicar) on Apr 16, 2009 at 19:06 UTC | |
by linuxer (Curate) on Apr 16, 2009 at 20:29 UTC |