Post by Roxas on Jan 11, 2011 20:15:08 GMT -5
<script type="text/javascript">
<!--
/*Spoiler UBBC Tags - By iAlex - Open Source*/
var iSpPic="http://img230.imageshack.us/img230/1641/shhep9.png"; //Spoiler UBBC Image
if(document.postForm && document.postForm.color){
var iSpSpan=document.createElement('span');
iSpSpan.innerHTML='<a href="javascript: add(\'[spoiler]\', \'[/spoiler]\')"><img src="'+iSpPic+'" border="0" alt="Spoiler" title="Spoiler" /></a>';
document.postForm.color.parentNode.parentNode.appendChild(iSpSpan);
}
if(location.href.match(/action=(display|(user)?recent|(calendar|pm)view|search2)/) || document.postForm){
var iTd=document.getElementsByTagName('td');
var i=iTd.length;
while(--i){
if(iTd.item(i).height=="100%" && iTd.item(i).width=="80%" && iTd.item(i).vAlign=="top" && iTd.item(i).align=="left" && iTd.item(i).className.match(/windowbg(2)?/) && iTd.item(i).innerHTML.match(/\[spoiler](.+?)\[\/spoiler\]/i) || document.postForm && iTd.item(i).width=="100%" && iTd.item(i).className.match(/windowbg2/) && iTd.item(i).innerHTML.match(/\[spoiler\](.+?)\[\/spoiler\]/i) && iTd.item(i).parentNode.parentNode.parentNode.cellPadding=="4"){
iTd.item(i).innerHTML = iTd.item(i).innerHTML.replace(/\[spoiler\](.+?)\[\/spoiler]/gi,'<b'+'r/><b>Spoiler: </b><div><input type="submit" value="Show" onclick="iShowHide(this)" /><div id="iSpoilerHold" style="display:none"><table class="bordercolor" cellspacing="1" cellpadding="4" border="0" width="80%"><tr><td class="windowbg">$1</td></tr></table></div></div></b'+'r/>');
}
}
}
function iShowHide(iButton){
if(iButton.value.match(/Show/)){
iButton.parentNode.getElementsByTagName('div').item(0).style.display='';
iButton.value='Hide';
}
else if(iButton.value.match(/Hide/)){
iButton.parentNode.getElementsByTagName('div').item(0).style.display='none';
iButton.value='Show';
}
}
//-->
</script>
It will add a spoiler tag. This might be useful, considering its a graphics forum =P
GLOBAL FOOTERS.