Post by Gryphynx on Oct 20, 2011 6:23:29 GMT -5
Any chance someone could install these Spoiler Tags to the forum (just slip them into a header or footer)? Then we could talk about comics without spoiling the end results for people (as I wish to do about the Fear Itself for the Fear Itself game )
/*
Spoiler tags by Todge
Copyright © 2010
Please keep this header intact
Global or Board Footer
*/
var spButton = 'http://images.proboards.com/new/code.png';
// Add spoiler button to posting page..
function addspoil() {
var bname = prompt("Spoiler Tag","Spoiler");
add('[spoiler='+bname+']','[/spoiler]');
return;
}
if(document.postForm) {
var spb = document.createElement('a');
spb.innerHTML = '<img src="'+spButton+'" border="0">';
spb.href = 'javascript:addspoil()';
document.postForm.color.parentNode.appendChild(spb);
}
// Find and create spoilers..
function spoilerSetup() {
if(pb_action.match(/(display|preview|(modify)?post|search2)/) ) {
var posts = document.getElementsByTagName('font');
for(p=0; p<posts.length; p++) {
if(posts[p].innerHTML.match(/\[spoiler=/) && (posts[p].innerHTML.match(/ google_ad_section_start/) ||
(document.postForm && posts[p].size=='1' && !posts[p].innerHTML.match(/<(input|select|textarea)/i)))) {
var spCell = '<fieldset><legend onclick="if(this.nextSibling.className==\'hidden\')';
spCell += '{this.nextSibling.className=\'spoilerbody\'}else';
spCell += '{this.nextSibling.className=\'hidden\'}">$1';
spCell += '</legend><div class="hidden">';
posts[p].innerHTML = posts[p].innerHTML.replace(/\[spoiler=(([^\[\]])+)*\]/g,spCell).replace(/\[\/spoiler\]/g,'</fieldset>');
}
}
}
}
setTimeout( function() { spoilerSetup(); }, 1000 );