Metalinks: A Greasemonkey script to collect links from Metafilter comments
November 23, 2011 5:55 PM   Subscribe

Metalinks: A Greasemonkey script to collect links from Metafilter comments
This is a new Greasemonkey script that looks through the current Metafilter page for links. It puts copies of any that it finds (except for stuff like "posted by Somebody at 12:34") into a sidebar on the right of the page, under "Tags" (and whatever other stuff may be in that area). Also, if you hover your mouse over one of the links (in the sidebar), a popup tooltip will open showing more context (i.e. the text of the comment that the link was from, albeit a pretty poorly formatted version of that text (sorry)).
Role: author
posted by Flunkie (8 comments total) 6 users marked this as a favorite

Just made a little update to it (thanks to harmfulray for the suggestion): After each link in the sidebar, there's now a "src" link, which will bring you back to the comment that the link is in.
posted by Flunkie at 8:07 PM on November 23, 2011 [1 favorite]


This is awesome.

Is there any need for links that are urls back to Metafilter comments? The script seems to pick up a lot of those links in the larger threads, e.g. when someone is responding to something another Mefite said.

Other than that it is really great, thanks.
posted by ollyollyoxenfree at 11:13 PM on November 24, 2011


Thanks, glad you like it.

I have just uploaded a new version that skips over any links to the current page (such as when a commenter quotes another commenter and links back to the comment that's being quoted). Thanks to you and also to symbioid for the suggestion.
posted by Flunkie at 9:08 AM on November 25, 2011


Very awesome. I've installed it. One request: For the hover on the link, please add a carriage return entity (13;) between the comment text and the "posted by X" line so it's easier to read.

Also, perhaps don't include the favorite ([+]) line if it's zero or otherwise empty. Same for [!]; sometimes that is empty as well (not quite parsed correctly). Or just leave off the latter entirely?
posted by Jubal Kessler at 10:58 AM on November 25, 2011


Hmm, there should be an & before #13; up there.
posted by Jubal Kessler at 11:00 AM on November 25, 2011


OK, I've uploaded a new version that:

(1) Leaves off the "[!]";

(2) Leaves off the "[+]" (assuming there are no favorites);

(3) Makes the "posted by" a little more readable, but unfortunately not as you describe:

The HTML "title" attribute (which is what I'm using to do the popup text) is unfortunately not all that friendly. If I stick the CR character entity into it, all that does is make the character entity show up literally in the popup text itself. So, I have instead inserted some spaces, so as to offset the "posted by" from the comment itself. I've also stuck in an actual CRLF, which (if I understand correctly) might work in some browsers (not mine), and maybe in future versions of browsers.

The real solution, I think, is to stop using "title", and instead make a real popup tooltip myself (I can't use any preexisting tooltip library that I know of because I have released the code to the public domain). That would also have the additional benefit of allowing the popup text to really be well-formatted, just like the real comment text. Unfortunately, that will take me more time than I would like to spend right at the moment, but I do hope to do it at some point in the future.
posted by Flunkie at 11:42 AM on November 25, 2011


hey, thanks for the fixup! It's looking better. Understood about the carriage-return entity.

Might I also ask if you can tag a YouTube or Vimeo link as such? In your copious spare time, of course...
posted by Jubal Kessler at 12:22 PM on November 25, 2011


Hmmm.... What would it look like? Maybe something like "(YouTube) link text | src"?

In any case, here's something you might want to try to see if it's good enough:

In your Metafilter account's preferences page, there's an option called something like "Show YouTube and Vimeo videos inline". If you turn on that option, then when someone posts a YouTube or Vimeo link in a comment, it will show up like this. If you click on that play button, it will play the video.

And if you're using this Greasemonkey script, the play button will also show up in the sidebar, immediately following the link it is for, like this.
posted by Flunkie at 1:25 PM on November 25, 2011


« Older I made a WWII Shoot 'em Up for Android...   |   Elevator Madness... Newer »


You are not currently logged in. Log in or create a new account to post comments.