Author
Message
Wishi-san
Unfettered
Joined: 20 Oct 2003 Posts: 602 Location: UK. Southwards.
Getting spoiler links to show up properly SB, we were talking about this in #uf and just so we don't have to highlight the text to see a link then this should work.
Only tested on Firefox and IE. On other browsers it probably won't do anything. Someone can add to it if they find it doesn't work for them.
Code:
<script language="Javascript">
function ChangeLinkStyle(obj, theclass)
{
if (document.layers || (document.getElementById && !document.all))
{
for (i=0; i<obj.getElementsByTagName("A").length; i++)
{
obj.getElementsByTagName("A").item(i).className = theclass;
}
}
else if (document.all)
{
for (i=0; i<obj.children.length; i++)
{
if (obj.children(i).tagName == "A")
{
obj.children(i).className = theclass;
}
}
}
}
</script>
Anyway, usage wise. In the CSS, you need to add an extra class. I just did this when testing:
Code:
a.spoilerlink { text-decoration: none; color : #ece6da }
a.spoilerlink:hover { text-decoration: underline; color : #ece6da}
And then for the actual spoiler onmouseover/out use:
Code:
onmouseover="this.style.color='#ece6da';ChangeLinkStyle(this, 'spoilerlink');" onmouseout="this.style.color=this.style.backgroundColor='#660000';ChangeLinkStyle(this, 'postlink')"
Then it should work. Appears to for me
_________________Given that God is infinite, and that the universe is also infinite... would you like a toasted tea cake?
Wishi-san x Wishi-san x Wishi-san
Posted: Sun Jul 25, 2004 9:54 am
AnthraX101
Entrenched
Joined: 18 Mar 2003 Posts: 797
Eep, no love for the Opera users any more.
AnthraX101
_________________VGhlcmUgaXMgbm8gc3Bvb24u
ll----ll--ll--ll----l---ll---llll---ll--l--ll---llll-ll-l-ll-llll--l-.
Posted: Sun Jul 25, 2004 1:20 pm
SpaceBass
The BADministrator
Joined: 20 Sep 2002 Posts: 2701 Location: pellucidar
Spoiler (Rollover to View):
I've modified the spoiler code based on Wishi's suggestion, except a little bit differently. URLs should now be a bit more visible.
_________________
Alternate Reality Gaming
http://www.unfiction.com/
Posted: Sun Jul 25, 2004 2:18 pm
konamouse
Official uF Dietitian
Joined: 02 Dec 2002 Posts: 8010 Location: My own alternate reality
Nice, very nice.
_________________
'squeek'
r u a Sammeeeee? I am Forever!
Posted: Sun Jul 25, 2004 3:54 pm
Wishi-san
Unfettered
Joined: 20 Oct 2003 Posts: 602 Location: UK. Southwards.
AnthraX101 wrote:
Eep, no love for the Opera users any more.
AnthraX101
It's true I don't like Opera
That's brilliant. Much nicer solution than mine. Good good, problemo solved.
_________________Given that God is infinite, and that the universe is also infinite... would you like a toasted tea cake?
Wishi-san x Wishi-san x Wishi-san
Posted: Sun Jul 25, 2004 5:00 pm
ZtinKyFinGaZ|
Guest
I'm not quite sure about this, but isn't it possible to hide the smileys as well?
Something with document.all or document.getElementsByTagName(img).style.visibility = 'hidden' or something
Posted: Mon Aug 02, 2004 11:20 pm
ZtinKyFinGaZ|
Guest
- and what if people accidentially rolls over a spoiler without wanting to see it? Wouldnt it be better OnClick or OnMouseDown/OnMouseUp?
Posted: Mon Aug 02, 2004 11:21 pm
Giskard
Sassypants
Joined: 07 Oct 2003 Posts: 2066 Location: Chicago
Thought I'd mention, the "/me" tag doesn't work when previewing... so you guys have something to do now all these superduper extras have been added
_________________"They never tell you truth is subjective, they only tell you not to lie." -- Gary Jules
Posted: Tue Aug 03, 2004 1:56 am
Wishi-san
Unfettered
Joined: 20 Oct 2003 Posts: 602 Location: UK. Southwards.
ZtinKyFinGaZ| usually the smilies don't actually mean anything so it's not too bad. If you roll over it then you can quickly enough roll off again. Making us click is bad, because we're the height of laziness.
_________________Given that God is infinite, and that the universe is also infinite... would you like a toasted tea cake?
Wishi-san x Wishi-san x Wishi-san
Posted: Tue Aug 03, 2004 7:08 am
Giskard
Sassypants
Joined: 07 Oct 2003 Posts: 2066 Location: Chicago
Oh and also: this "smiley" rocks:
_________________"They never tell you truth is subjective, they only tell you not to lie." -- Gary Jules
Posted: Tue Aug 03, 2004 12:44 pm
Display posts from previous: All Posts 1 Day 1 Week 2 Weeks 1 Month 3 Months 6 Months 1 Year Sort by: Post Time Post Subject Author Ascending Descending