Post by Wormopolis on May 31, 2009 12:12:32 GMT -8
Browser Tested: IE and FF
placement: Global or Board footer
Add thread IDs into variable in order to hide polls no longer needed on a thread. Not as good as being able to delete polls, but as close as you can get I guess.
code:
Preview: It hides the poll from a thread. use your imagination.
UPDATES TO THIS CODE FOUND ON wormocodes.proboards.com
placement: Global or Board footer
Add thread IDs into variable in order to hide polls no longer needed on a thread. Not as good as being able to delete polls, but as close as you can get I guess.
code:
<script type="text/javascript">
<!--
// Hide poll on selected threads
// By Wormopolis - wormocodes.proboards.com
// do not repost - keep header intact
var threadIDs = new RegExp("thread=(98|123|67)$","i"); //add IDs into this regexp
if (location.href.match(/board=/)) {
if (location.href.match(/action=display/) && location.href.match(threadIDs)) {
for (tds=document.getElementsByTagName('td'), e=0; e<tds.length; e++) {
if (tds[e].width=="20%" && tds[e].className=='catbg' && tds[e].align=='left' && tds[e].vAlign=='bottom' && tds[e].getElementsByTagName('img') && tds[e].getElementsByTagName('img')[0].alt=='[poll]') {
tds[e].parentNode.style.display="none";
tds[e].parentNode.nextSibling.style.display="none";
}
}
} else {
for (lnks=document.getElementsByTagName('a'), e=0; e<lnks.length; e++) {
if (lnks[e].href.match(threadIDs) && lnks[e].parentNode.parentNode.parentNode.getElementsByTagName('img') && lnks[e].parentNode.parentNode.parentNode.getElementsByTagName('img')[0].alt=='[poll]') {
lnks[e].parentNode.parentNode.parentNode.getElementsByTagName('img')[0].style.display="none";
}
}
}
}
// -->
</script>
Preview: It hides the poll from a thread. use your imagination.
UPDATES TO THIS CODE FOUND ON wormocodes.proboards.com