my first user script
Feb 17, 2005, 11:32pm EST
My first (real)
greasemonkey user script is for
adding
user pics to livejournal user links. That is, if you hover over a
livejournal user link (like this one:
idealisms),
the user’s userpic appear above your cursor.
Futhermore, the script use XMLHttpRequests and doesn’t require user intervention because all the requests are made to livejournal.com.
I had actually done something similar in my livejournal S2 style, but I gave up when I realized that there was no way to get userpic urls for most user links in S2. I was reminded of the idea today when I read about a related PHP script.
Hmm, it’s unclear to me whether I should have posted this here on my tech blog or on my more personal livejournal.
ShenmeShenme at Jun 04, 2005, 03:00am EDT
A slight fix around line 65 for people who are using some “always show full user info script” or viewing info in full user info mode otherwise
if (url.match(info_regex)) {
// take care of http://www.livejournal.com/userinfo.bml?user=someone&mode=full
url = url.replace(/\&mode=[a-z0-9_]+$/, “”)
url = url.replace(/^.*=/, “http://www.livejournal.com/users/”)
}