Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: [Free Nodelet Hack] Highlight monk names accordingly their XP level

by linuxer (Curate)
on Apr 04, 2009 at 20:17 UTC ( [id://755477]=note: print w/replies, xml ) Need Help??


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
    Thank you, I did not vizit home nodes in that time and did not know about that side effect. Also I found that original color scheme is ugly. Here is more pretty one.
    <style type="text/css"> .Pope { font-weight: bold; color: #01C2F3 !important; } .Saint { font-weight: bold; color: #F400B1 !important; } .Cardinal { font-weight: bold; color: #F400B1 !important; } .Archbishop { font-weight: bold; color: #F400B1 !important; } .Bishop { font-weight: bold; color: #F400B1 !important; } .Chancellor { font-weight: bold; color: #FF8000 !important; } .Canon { font-weight: bold; color: #FF8000 !important; } .Abbot { font-weight: bold; color: #FF8000 !important; } .Monsignor { font-weight: bold; color: #BA4D73 !important; } .Prior { font-weight: bold; color: #BA4D73 !important; } .Parson { font-weight: bold; color: #BA4D73 !important; } .Vicar { font-weight: bold; color: #51AE5A !important; } .Priest { font-weight: bold; color: #51AE5A !important; } .Curate { font-weight: bold; color: #51AE5A !important; } .HighPriority { font-weight: bold; background-color: #FFFF00 !importan +t; } </style>

      Thank you for the new style. It's indeed prettier and more readable than the previous one. I haven't found the time and/or motivation to hack on that. So thanks again, I like it.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://755477]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (5)
As of 2024-04-25 10:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found