What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 128 Stack Exchange communities.

My friends and I over at SciFi Beta, have been noticing a few problems. The first is: The spoiler tag is used almost in every other question (or in an answer) and two:

I have to constantly reposition the mouse, when I'd like to quickly read the question.

So I was suggestion a site wide (not exchange wide) setting that disables the hiding of a spoiler. I wouldn't mind having to click on the spoiler text to enable the "show spoiler" feature.

Btw, I'm lazy so the full question is here: Opting out of hiding spoiler markdown content.

share|improve this question
2  
Click to show is already an existing feature request on its own, so yours is probably best centered on just the preference. That said, if it's used to the point of being problematic, it may be wise to revisit the frequency of its usage on that site. –  Grace Note May 17 '11 at 18:39
1  
    
I'm talking about a site wide setting –  Justin May 17 '11 at 19:03
    
If it's site-wide, then isn't @Rebecca's ARGing even more appropriate? –  Grace Note May 17 '11 at 19:13
1  
Why don't we just get rid of spoiler markup since everything is a spoiler to someone –  random May 18 '11 at 1:47

3 Answers 3

up vote 8 down vote accepted

The odds of getting a site-wide setting are pretty low, but you can use a userscript to unhide spoilers. I do it with:

function with_jquery(f) {                                                                                                                                      
    var script = document.createElement("script");                                                                                                             
    script.type = "text/javascript";                                                                                                                           
    script.textContent = "(" + f.toString() + ")(jQuery)";                                                                                                     
    document.body.appendChild(script);                                                                                                                         
};                                                                                                                                                             

with_jquery(function($) {                                                                                                                                      
    $('.spoiler').removeClass('spoiler').css('background-color', '#fbb');                                                                                      
});

The result is:

Screenshot of the result

share|improve this answer
    
Darn, I was going to create the user Script. Drat! –  Justin May 17 '11 at 19:41
1  
PS, userscripts are new to me, how do I use them? Install them, or whatever? –  Justin May 17 '11 at 19:44
    
@Justin I put it on userscripts.org; there's an Install button. You need to be using a browser that supports them (Firefox with Greasemonkey, or Chrome) –  Michael Mrozek May 17 '11 at 19:52
    
Could you put it up on Stack Apps? –  Gilles May 17 '11 at 20:05
    
@Gilles, does StackApps have a install into site function? –  Justin May 17 '11 at 20:16

The spoiler tag is just a bit of CSS. I believe all modern browsers allow use of a user style sheet (and this doesn't require installing any sort of extension to run user scripts). So all you need to do is add a rule that overrides the CSS in your user style sheet, and you're done.

(I don't think user style sheets can be site-specific, so this would change any site that uses the "spoiler" CSS class. If that does have an impact, then IMO a better feature request would be to have SE change the class to something like "stackexchange-spoiler").

For example, in Safari, go to Preferences, then Advanced, then select the stylesheet.

Your stylesheet only needs to contain something like this:

.spoiler { color: #444 !important; }

444 is the colour that you get when hovering - you could make it something else if you wanted spoilers to stand out in some way, or add other markup like a background colour (e.g. so you avoid referencing them in answers!).

share|improve this answer

I've created the StackApps entry for the UserScript and a Safari Extension.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .