Thread:Lenhi/@comment-30768879-20161217005940/@comment-24692230-20161217024232

Dan Wooge wrote: Hey, um, sorry to botherr you again but how do I do the Stext template on my wiki. I copied and pasted the template, but it won't work. You also need this CSS: /*Spoiler tag*/ .spoiler.on { border: 1px dotted #D5D4D4; border-top: none; background: transparent !important; color: transparent !important; text-shadow: none !important; padding: 0 1.4px; } .spoiler.off { border: 1px dotted #D5D4D4; border-top: none; padding: 0 1.4px; } .spoiler.on a { color: transparent !important; } .spoiler.on img { visibility: hidden; } and this JS: /* Spoiler tag + buttons */ if ($('.spoiler').length) { switch (wgCanonicalNamespace) { case 'User': case 'User_talk': $('.UserProfileActionButton .wikia-menu-button').before(               'Show Spoilers '            ); break; }   $('.wikinav2 .WikiaPageHeader').css('padding-right', '0'); $('#WikiaPageHeader .comments').after(       'Show Spoilers '    ); } $('#toggle-spoiler').click(function {   if ($('.spoiler.on, .spoiler.off').length) {        $('.spoiler').attr('class', 'spoiler').removeAttr('title');        $('.wikia-button#toggle-spoiler').attr('title', 'Hide all spoilers on the page').html('Hide Spoilers');    } else {        $('.spoiler').attr('class', 'spoiler on').attr('title', 'click to show the spoilers');        $('.wikia-button#toggle-spoiler').attr('title', 'Show all spoilers on page').html('Show Spoilers');    } }); var spoilerConfig = function(i, el) { var $el = $(el); $el.attr('title', 'click to show the spoilers'); $el.click(function {       var $this = $(this);        if ($this.hasClass('on'))            $this.attr('class', 'spoiler off').removeAttr('title');        else            $this.attr('class', 'spoiler on').attr('title', 'click to show the spoilers');    }); }; $('.spoiler.on').each(spoilerConfig);