Boolean (boolean263) wrote in lj_nifty,
Boolean
boolean263
lj_nifty

Clickable Current Music

(This is something nifty you can do with LiveJournal, but I'm not sure this is quite on-topic. If it's not, let me know for future reference.)

I've noticed an occasional LJ entry where someone has put a URL into their "Current Music" field. I've tried to do that from the web entry form without success. Apparently, it's something you can only do if you download a LJ client and post with that.

I like the web entry form; it does everything else I need, and I don't want to have to download a program just so I can do this one thing. So I took some inspiration from Jesse Ruderman's bookmarklets page, and made a bookmarklet that'll "fix" the web form. This post is an example of it in action.

Create a bookmark with this as the URL:

(That should all be one line.) Save it on your bookmarks toolbar. Then, whenever you want to enter a long song name (or a long mood, if you're into that sort of thing), just give it a click. It changes the music field's maxlength to 100, to give you a bit more breathing room, and its size attribute gets bumped up as well, so you can tell something's up.

Caveats:
  • The official limit stated by LiveJournal is "255 bytes or 100 characters" for the Music and Mood fields. If you know for a fact you'll only ever be entering single-byte characters in the field, you could probably change the bookmarklet to limit you to 255 characters. But do this with caution! Otherwise you may end up entering more than 255 bytes' worth of data, and presumably, LiveJournal will truncate it. (If you don't know what I'm talking about, it's probably best to leave it alone.)
  • I wrote it so it works on both the New Entry and the Edit Entry page. However, when you edit an entry that you've done this in, the fields will be cut off at their old length limit. You'll have to re-type the rest of the text yourself. The bookmarklet will make it so you can do that, though.
  • I've only tested this on FireFox 0.9.1, but it should work in Opera or Internet Explorer as well.
  • I don't know a way to make it do this automatically when you make an entry, but I do this seldom enough that I don't mind clicking a button to make it work. If you're really super-geeky, you could probably find a way to use something like Proxomitron to do it for you.

Edited umpteen times to get the <lj-cut> to work. And to use a <textarea> to keep it from stretching.
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 11 comments