MoneyBoard - Money Making Forums

Full Version: Spoiler Mycode
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Regular Expression
Code:
\[spoiler\](.*?)\[/spoiler\]

Replacement
Code:
<div>
<input type="button" value="Show Spoiler" style="width:80px;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 Spoiler'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.value = 'Show Spoiler';}">
    </div>
    <div>
        <div style="background: #ffffff;margin: 0 15px 15px 15px;padding: 5px;border: 1px solid black;display: none;">
$1
</div>
    </div>
</div>

Usage
Code:
[spoiler]Hidden text[/spoiler]

Example
Code:
[spoiler]your MyBB spoiler message here[/spoiler]
Reference URL's