Suggestion... - by zombe
Vigil on 15/9/2005 at 19:30
Ah, that's a very good idea!
Vigil on 16/9/2005 at 09:44
That's a fair suggestion, except that if you wanted to go down that road then spoiler tags are probably not the place to start. The page markup is bloated enough that a simple onclick="showSpoiler(this)" is a very small drop in the well - there are better savings to be had cheaper elsewhere.
Personally I would say that IE's behaviors are the ideal solution to this since they can be applied directly in CSS. The only problem is that they are currently only supported by IE, despite being under assessment as a standard and planned for Gecko for quite a while.
tungsten on 16/9/2005 at 09:54
uncool for two reasons. :thumbdown:
- javascript
- if I want to see the spoilers in a thread I sometimes want to see all and sometimes only this one.
I like the current version.
3rd: keep it as simple a possible, then it works in most browsers. even "minority browsers" or such exotic things like IE.
note: the above is simply my opinion, which may be strange.
Vigil on 16/9/2005 at 10:39
Well, that's just it - this way is still compatible with the previous way of highlighting, so it doesn't actually interfere with normal usage at all. It's only when you click on a particular spoiler that it toggles that spoiler, saving you the trouble of clicking-and-dragging to select it - not what I'd call an irritating behavior.
And for any browser that doesn't support it, the old way will still work fine; so it's not impairing anyone either. Essentially it's a win-win, unless you have a very good reason for being allergic to javascript.
To clarify my previous post: I do think offloading event handlers to a separate javascript initialisation file is a fine and noble enterprise. I just meant that it would be better to approach the situation holistically and streamline the whole page with that technique, rather than implement what is quite a complex set of code for just one case (spoilers).
(Also, adding event handlers at load time does have the problem that you need to wait for the whole page to load before the functionality is available. On slow connections or image-heavy pages this can take quite a long time.)
zombe on 16/9/2005 at 11:52
Quote Posted by Vigil
Essentially it's a win-win
Seconded.
And it seems we did hit 'someones' nerve with that onclick thing :( - wondering who that was?
David on 16/9/2005 at 11:58
Me. It was one of the things I neglected to deal with when HTML was off.
JavaScript is one of my primary concerns about allowing HTML on the forums, and I am continuously thinking that it's not a great idea to have it turned on.
SubJeff on 16/9/2005 at 12:23
So easy to abuse isn't it? By idiots like me. :p
David on 16/9/2005 at 12:47
What appeals to me more than onClick is onMouseOver and just change the colour of the text, much like SomethingAwful does. Still, any changes won't be made until the next major version of vB comes out. (It's current at the Release Candidate stage)
Some people prefer posting in HTML, giving them more flexability. Personally I feel that BB code is enough, but plenty of people don't, so HTML is on, although there are a lot of html tags that are censored, as you found with <script, for example.
While I'm at it, the spoiler tag isn't a standard vB feature, it's one of ours. :p