The Bride of the First House (bride) wrote in lj_nifty,
The Bride of the First House
bride
lj_nifty

LJ-Cut Manipulation: Different Text in Different Views

timwi was playing with this and I thought it was rather nifty:

--------------------

You are reading this post from the Comment View. =)

You are reading this post from the Recent, Friends or Day View. =)

The above text will be different depending on where you're reading from: the Comment View or one of Recent, Friends or Day Views.

--------------------

Here's the HTML that does that:

... optional text in all views ...

<span style="display: none;"><lj-cut></span>
... text in the Comment View ...
<span style="display: none;"></lj-cut></span>

... optional text in all views ...

<span style="display: none;"><lj-cut>
<span style="display: none;"></lj-cut></span>
... text in the Recent, Friends and Day View ...
<span style="display: none;"><lj-cut></span></lj-cut></span>

... optional text in all views ...

[Update]

Okay, I bolded the different text and made it bigger so that it might be easier to see. Sorry for the confusion =)

Basically, if you go here, the third line will say "...Recent, Friends or Day View". If you go here instead, it will say "...Comment View".

By messing around with the LJ-Cut, you can potentially have completely different content on the two views. =)

[Update]

Oh, BTW, this works in Mozilla 1.5+, Opera 7.21+ and IE 5.5+; Safari has problems with it. I think it's the way the style="display: none;" is interpreted in the different browsers.

Subscribe

  • friends history

    many years ago, we had the marnanel joule that kept track of our friends history. but it went away around 2011. in fact a lot of livejournal has…

  • ArtLJ

    I was screwing around with custom styles earlier when I stumbled across artlj ( Translations available at Google and Microsoft). It…

  • No more grey comment button!

    Last night I hacked together a Greasemonkey script so that anyone affected by the grey comment button problem can post a comment. Any comments or…

  • 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 

  • 12 comments

  • friends history

    many years ago, we had the marnanel joule that kept track of our friends history. but it went away around 2011. in fact a lot of livejournal has…

  • ArtLJ

    I was screwing around with custom styles earlier when I stumbled across artlj ( Translations available at Google and Microsoft). It…

  • No more grey comment button!

    Last night I hacked together a Greasemonkey script so that anyone affected by the grey comment button problem can post a comment. Any comments or…