murklins: Woman facing away, observing her handiwork. She's changed wall graffiti from "ANARKY FOR EVER" to "ANARCHY FOREVER". (red pen)
murklins ([personal profile] murklins) wrote in [community profile] newslettering2011-03-13 05:03 pm

Greasemonkey Script: LJ/DW Title Rewriter

I don't work on any newsletters right now, but I recently had to post a bunch of links to Delicious using a common newslettering format: all the bookmark titles are formatted as "username: post subject" and all the links are clean (no style=mine, etc). This should be really easy to do, but too often it involves tedious manual c&p work to get the username in there when using the clean link*. If a journal uses custom comment pages, instead of having the username in the post title, often the very useless user-specified "Name" is in there. And on comms, only the comm name appears, never the poster name.

So this script fixes that! Any time you load an entry page in DW or LJ, it makes a quick call to the format=light version of that page to get the "username: post subject" or "username in community: post subject" info, and then sets that as the current page title. When you go to bookmark that page to Delicious, your Delicious posting tool should now automatically fill in a more useful link title for you.

LJ/DW Title Rewriter

It should work out of the box in Opera, but I haven't tested that. I forget what Chrome's user script limitations are, but I suspect it might not work in Chrome. I can make a Chrome version, though, if anyone is interested enough to speak up.

Let me know if you find any bugs and then I will fix them!

*ETA: This script doesn't change the URL! I only mentioned the clean links bit because the two requirements of clean links AND "username: post subject" format are often mutually exclusive. It's pretty easy to get that format (for non-community posts, anyway), but only if you dirty up the URL with ?format=light or ?style=mine.
ursamajor: Tajel on geeks (geeks: love them)

[personal profile] ursamajor 2011-03-14 01:30 am (UTC)(link)
I like! It's useful to me to see that information in there, and have it be clarified, so thank you :)

One thing - I tried from a ?reply page, and that didn't get stripped; I also accidentally tried from a #comments page, and that too remained in the URL. Is this script supposed to strip URLs down to baseline as well, or am I misunderstanding?
trobadora: (Default)

[personal profile] trobadora 2011-03-14 01:41 am (UTC)(link)
Oh, that's fabulous, thank you!
hermitsoul: woman wearing a corset (* fandom bookmark: hermitsoul)

[personal profile] hermitsoul 2011-03-14 04:54 am (UTC)(link)
This is completely amazing - thank you so much! *excitedly runs off to pull newsletter together*
oxoniensis: charlie crews and dani reese in front of crime scene tape (fandom: life i'm zennish)

[personal profile] oxoniensis 2011-03-14 12:42 pm (UTC)(link)
This is awesome - it'll be a big help to me for my delicious recs. Thank you!
acari: (\o/)

[personal profile] acari 2011-03-14 01:06 pm (UTC)(link)
Oh, that's fabulous. Very, very useful. Thank you.