?

Log in

LJ comment preview Greasemonkey script - Sophie
browse
my journal
links
January 2012
 

Date: 2011-12-23 02:27
Security: Public
Mood:happy happy
Tags:dreamwidth, greasemonkey, livejournal
Subject: LJ comment preview Greasemonkey script

[this is a public post on LJ]

I don't tend to do new stuff explicitly for LiveJournal nowadays, since I'm on Dreamwidth, but LJ came out with an interesting claim recently regarding the lack of a Preview button on the new commenting form:

Since a Preview button isn't easily/quickly possible with the new form, we have made the ability to edit comments available to all account types.
I was honestly a bit baffled by this, because it's actually really easy to add a Preview button. In fact, I knocked up a Greasemonkey script to add one in less than half an hour, and I've never previously touched the new commenting code. (Download here. Greasemonkey script has been tested on Firefox and Chrome; if anybody else knows if it works on other browsers, let me know! To run it on Firefox, you'll need the Greasemonkey add-on. Chrome users don't need any separate addon!)

But at the same time, I don't think LJ are deliberately and shamefacedly lying, because allowing all users to edit comments is going to put a dent in their bottom line. Lots of people find the ability to edit comments incredibly useful, and there's now one less reason for people to have paid accounts.

Rather, I suspect the reason they're not introducing the Preview button on the new form is because the Preview page includes a subject line field, and they seem to be doing their best to want to get rid of subject lines. (Don't ask me why, I have no clue.)

Anyway, I mainly made this post to get this Greasemonkey script out there, because as much as I'd love people to come to Dreamwidth, there are some people who aren't going to want to do so, and being able to preview comments is kind of important. That said, if you do read this, do consider giving Dreamwidth a try. You don't even need an invite code if you sign up before the end of the year, because DW have opened up the create flow for a limited period of time. So come on over and give it a try. :)

[edit (Dec 23rd): I updated the code as there were some cases when the code would pop up a "No can do." message box - if the page wasn't using the new commenting scheme. Please download the new version.]

[edit (Dec 24th): I've learned that stuntpilot99 has made a Stylish style that makes LJ a bit easier to read by replacing the fonts with the fonts used before, slightly widens some margins, and other things. It also puts a soft grey background on everything, but as I don't like that myself, in the version I've got installed I edited it and replaced every instance of "#f7f7f7" with "#ffffff", which makes it white. In any case, go check it out. :)]

This entry was originally posted on Dreamwidth, at http://sophie.dreamwidth.org/48927.html. You can comment either here or there.

Post A Comment | 24 Comments | Share | Link



always in distress mode•
User: moulin
Date: 2011-12-23 03:05 (UTC)
Subject: (no subject)

Just want to say thank you again for doing this for us. Greasemonkey is going to be our savior this Christmas if LJ continues to be adamant.

Reply | Thread | Link

raemia: Queensjoy rose
User: raemia
Date: 2011-12-23 03:07 (UTC)
Userpic:Queensjoy rose
Subject: (no subject)

Thank you so much for this script! I added a link to it here so hopefully more people can see it!

Reply | Thread | Link

is that a fact or a weapon: keep you still whatever else you do
User: disprove
Date: 2011-12-23 03:40 (UTC)
Userpic:keep you still whatever else you do
Subject: (no subject)

On a tablet right now so bookmarking for later use. Thanks very much!

Reply | Thread | Link

never give up!  ৵  never surrender!
User: loquaciousquark
Date: 2011-12-23 04:51 (UTC)
Subject: (no subject)

Thank you so much for this. This is invaluable.

Reply | Thread | Link

Nishi ☆彡: Chii ★ Smile (animated)
User: ryuuseicomplex
Date: 2011-12-23 06:09 (UTC)
Userpic:Chii ★ Smile (animated)
Subject: (no subject)

Thank you very much. (:

Reply | Thread | Link

Invisible Friend
User: el1ie
Date: 2011-12-23 11:25 (UTC)
Subject: (no subject)

Thank you, the "edit" feature may be welcome at first by those who have never had it before, but it is a poor substitute to the "preview" as I think they may find out when they realise it's limitations and annoyances of generating multiple notifications.

Reply | Thread | Link

Marriage for All
User: venivincere
Date: 2011-12-23 12:22 (UTC)
Subject: Ooh! Subject line!

Thank you so much for this, soph! :-)

Reply | Thread | Link

Myra
User: myrana
Date: 2011-12-23 15:18 (UTC)
Subject: (no subject)

Amazing. Thanks so much! I knew it wasn't as complicated as LJ were making it out to be...

Edited at 2011-12-23 15:18 (UTC)

Reply | Thread | Link

Ravan Asteris
User: ravan
Date: 2011-12-24 08:18 (UTC)
Subject: (no subject)

Beautiful: What they said was so haaaard, in 12 lines of javascri.pt plus a few lines of header.

They really are incompetent, aren't they?

Reply | Thread | Link

☂
User: bronze
Date: 2011-12-28 05:22 (UTC)
Subject: (no subject)

Thank you for this! I only just noticed the lack of the preview button - you're a lifesaver!

Reply | Thread | Link

conigliomannaro: :D
User: conigliomannaro
Date: 2011-12-29 13:01 (UTC)
Userpic::D
Subject: (no subject)

Using, crediting and reccing. Thank you a lot!

Reply | Thread | Link

yorkshirewench: [Whitechapel] Chandler snow
User: yorkshirewench
Date: 2011-12-29 13:11 (UTC)
Userpic:[Whitechapel] Chandler snow
Subject: (no subject)

Thank you!

Reply | Thread | Link

neuromancer: DBSK - Yoochun03
User: n3uromanc3r
Date: 2011-12-29 14:13 (UTC)
Userpic:DBSK - Yoochun03
Subject: (no subject)

Thank you very much!

I's very useful because although I noticed if I watch the entries in my style my custom css allows me to use the preview function, but this way everything seems easier! [heart]

Reply | Thread | Link

Raven Kavanagh: [axel] laugh play live
User: ravewalker
Date: 2011-12-29 14:38 (UTC)
Userpic:[axel] laugh play live
Subject: (no subject)

Aaaaaaaaaaah, preview button! Thankyou so much!

Reply | Thread | Link

Grand Master Planet Eater
User: zarla
Date: 2011-12-30 02:18 (UTC)
Subject: (no subject)

man thanks a bunch for this, i was missin that button like nothing else

Reply | Thread | Link

renne
User: renne
Date: 2011-12-30 02:20 (UTC)
Subject: (no subject)

YESSSSS. it's funny because i thought i never really used it when it was there, but once it was gone i was like "...well shit."

Reply | Thread | Link

is that a fact or a weapon
User: disprove
Date: 2011-12-31 12:36 (UTC)
Subject: subject lines yay

Hello! Just in case anyone's interested, I too have a userscript I cobbled together over here.

One of its options is that it puts the subject line back where it used to be. Er, well, only sort of. I say only sort of, cos while it can't get the subject field back, it does put existing subject lines made in old comments or new ones with your super duper handy Preview button back to where it belongs: on top of the comment header, instead of within the comment text area.

Also, I just recently updated the style and now it's got a new option for keywords-only userpic selection. Might be useful for all those who've declared themselves allergic to having their entire icon collection load each and every time they try to pick one measly userpic.

Reply | Thread | Link

Sophie
User: soph
Date: 2011-12-31 13:51 (UTC)
Subject: Re: subject lines yay

I actually already have your Stylish script! It's awesome and I was planning to update this post to point to it, but while I knew who wrote it, I wasn't able at all to figure out where to link to, because I'd forgotten the URL and while I could get to http://userstyles.org/styles/58535/livejournal-release-88-tweaks , there wasn't a link from there to your mintyapple post. You may want to put one in. :)

I actually myself use a few other fixes too. For example, I don't like the blue text on comment headers, so I change it to black with:

  .b-leaf-meta {
    color: black !important;
  }


I also make the subjects a bit larger:

  h4.b-leaf-subject {
    font-size: larger !important;
  }


Not sure if you're interested in any of those tweaks to your tweaks, but thought I'd offer them up. :)

I also use a few other style tweaks:

  /* Reduce the space between collapsed comments */
  div.b-leaf-collapsed {
    margin-bottom: 0px !important;
  }

  /* Remove the checkboxes on collapsed comments */
  div.b-leaf-collapsed .b-leaf-actions-check {
    display: none !important;
  }

  /* Get rid of the 'fake' dotted underline on links and put a real one back in */
  .b-singlepost .b-pseudo,
  .b-singlepost .b-pseudo:link,
  .b-singlepost .b-pseudo:visited {
    border: none !important;
    text-decoration: underline !important;
  }
  .b-addcomment-inner {
    border: none !important;
    text-decoration: underline !important;
  }


The dotted underline fix doesn't fix all the links, but it fixes most of them. :)

Anyway, yeah, those are my own tweaks, if you want to use them. If not, that's fine too :D

[edit: Note that if you do use these tweaks, you'll probably want to remove the extraneous 'div's in there, such as changing "div.b-leaf-collapsed" to just ".b-leaf-collapsed". I put the "div" in there simply to make it more specific than your tweaks CSS and thus to take effect all the time. :)]

Edited at 2011-12-31 13:54 (UTC)

Reply | Parent | Thread | Link

My sky. My limit.
User: sphinxofthenile
Date: 2012-01-01 21:49 (UTC)
Subject: (no subject)

Thank you! Snagging it! ♥

Reply | Thread | Link

V.
User: aurora_84
Date: 2012-01-02 16:23 (UTC)
Subject: (no subject)

This is excellent, thank you so much!

Reply | Thread | Link

LadyCat
User: ladycat777
Date: 2012-01-06 19:06 (UTC)
Subject: (no subject)

Thank you SO MUCH. You got verdana back!! I can read things again!

I cannot express my gratitude enough for all of this *installs on everything I own*

Reply | Thread | Link

Sophie
User: soph
Date: 2012-01-06 21:53 (UTC)
Subject: (no subject)

I'm glad you like it, but I should note that I'm not the person who made the style I linked to at the end of the entry! That was stuntpilot99, not me. The Preview button script doesn't do anything with the fonts, so I expect it's that you're talking about. :)

[edited: So I keep using the wrong user tag on LJ, oops!]

Edited at 2012-01-25 20:46 (UTC)

Reply | Parent | Thread | Link

LadyoftheLight: * Autumn - Tranquility
User: marilla_pm67
Date: 2013-03-15 10:41 (UTC)
Userpic:* Autumn - Tranquility
Subject: (no subject)

Grabbed this and added it at the long add-on list for LJ

Sam

Reply | Thread | Link

Denise
User: capri_chan
Date: 2015-08-08 05:50 (UTC)
Subject: (no subject)

Thanks! I haven't been here in a few years, and I was confused by the sudden disappearance of that button.

Edit: Oh. Okay, it now adds the button, but now the button doesn't work. Either LJ has fucked it up again, or my internet connection screwed up in the middle.

Edited at 2015-08-08 05:55 (UTC)

Reply | Thread | Link