murklins (
murklins) wrote in
newslettering2011-03-13 05:03 pm
![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
![[community profile]](https://www.dreamwidth.org/img/silk/identity/community.png)
Entry tags:
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.
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.
no subject
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?
no subject
I use other techniques to clean the URL, but I haven't reviewed them in a while. I bet some of them don't work anymore. Delicious changed their post interface so drastically and I haven't had the heart to see what that did to all my Delicious-related GM scripts.
no subject
no subject
no subject
no subject
no subject
no subject
no subject
no subject