MyBB Community Forums

Full Version: MyCode to activate all spoilers on page
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm not necessarily looking for a java script because these days browsers only let you enter java scripts through the Web Console - which is an inconvenience. I'm basically looking for a link users are able to click on the page (can be in a form of MyCode) that will open up all spoilers on that page. A MyCode will do. I really need this! For examples, please refer to my forum.
I'll pay with Paypal if someone can provide me with a MyCode for this.

~Thanks.
I think it depends in what spoiler code you use.
\[spoiler\](.*?)\[/spoiler\]
and
<div style="margin:20px; margin-top:5px">
<div class="smallfont" style="margin-bottom:2px"><strong>Spoiler : </strong>&nbsp;<input type="button" value="Show" style="width:60px;font-size:10px;margin:0px;padding:0px;" onClick="if (this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = ''; this.innerText = ''; this.value = 'Hide'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = 'Show'; }">
</div>
<div class="trow2" border="1" style="margin: 0px; padding: 6px; border: 1px inset; background:#eee;">
<div style="display: none;">$1</div>
</div>
</div>
A javascript would definately not work in this case. Best thing is a link (ie MyCode).