Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

samtregar (2699)

  (email not shown publicly)

Journal of samtregar (2699)

Friday April 15, 2005
11:50 AM

Greasing the Meerkat

[ #24205 ]
I while back I wrote about wanting a better use.perl link display in Meerkat. My solution at the time was Middleman, a configurable HTTP proxy. I ended up ditching it after it caused some extremely difficult to debug problems developing a web-app. Instead I created a little chunk of Javascript which accomplished the same thing. I attached it to a link on my tool-bar which I click every time I visit Meerkat. It works, but it's hardly ideal.

Enter Greasemonkey, a plugin for Firefox which allows you to add Javascript to a page based on a URL match. I took the Javascript I already had in my link, converted it to a Greasemonkey user-script and now I see author names in Meerkat without any effort on my part. Fantastic!

For the record, here's my user-script:

// ==UserScript==
// @name          Meerket User Names
// @namespace
// @include*
// ==/UserScript==

(function() {
    for (var x = 0; x < document.links.length; x++) {
        var l = document.links[x];
        if (l.href.indexOf('~') != -1) {
            var name = l.href.substring(l.href.indexOf('~'));
            name = name.substring(1, name.indexOf('/'));
            l.innerHTML = '[' + name + '] ' + l.innerHTML;


The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.