|
bgcolor
Feb 15, 2012 1:26:49 GMT -4
Post by MonsterControl on Feb 15, 2012 1:26:49 GMT -4
<script type="text/javascript"> <!--
/*Custom Post Background Color UBBC - By iAlex - Open Source*/
var iCustomImage = "http://img410.imageshack.us/img410/7852/ibgcolorhuhubbclawldn4.png"; //UBBC Image
if(document.postForm){ var iSayWhat=document.postForm.color.parentNode.parentNode; var iLinkyMe=document.createElement('a'); iLinkyMe.href='javascript: add("[bgcolor=COLOR]")'; var iClickMe=document.createElement('img'); iClickMe.src=iCustomImage; iClickMe.border='0'; iLinkyMe.appendChild(iClickMe); iSayWhat.appendChild(iLinkyMe); if(location.href.match(/quote/)){ document.postForm.message.value = document.postForm.message.value.replace(/\[bgcolor=(.+?)\]/gi, ''); } if(document.postForm.subject && document.postForm.subject.value.match(/Re:/)){ var iTd=document.getElementsByTagName('td'); for(i=0;i<iTd.length;i++){ if(iTd.item(i).width=="100%" && iTd.item(i).className.match(/windowbg2/) && iTd.item(i).innerHTML.match(/\[bgcolor=(.+?)\]/i)){ iTd.item(i).style.backgroundColor=RegExp.$1; iTd.item(i).innerHTML=iTd.item(i).innerHTML.replace(/\[bgcolor=(.+?)\]/ig, ''); } } } } if(location.href.match(/action=(display|recent|calendarview|search2|pmview|userrecent)/) || location.href.match(/index.cgi$/) && document.title.match(/Preview/) && document.postForm){ var iTd=document.getElementsByTagName('td'); for(i=0;i<iTd.length;i++){ if(iTd.item(i).width=="80%" && iTd.item(i).height=="100%" && iTd.item(i).className.match(/windowbg(2)?/) && iTd.item(i).align=="left" && iTd.item(i).vAlign=="top" && iTd.item(i).innerHTML.match(/\[bgcolor=(.+?)\]/i)){ var iColourMeUp=RegExp.$1; var iInsertVariableHere=iTd.item(i).parentNode.getElementsByTagName('td'); for(a=1;a<iInsertVariableHere.length;a++){ iInsertVariableHere.item(a).style.backgroundColor=iColourMeUp; } iTd.item(i).innerHTML=iTd.item(i).innerHTML.replace(/\[bgcolor=(.+?)\]/gi, ''); } } }
//--> </script>
Read more: http://smangii.proboards.com/index.cgi?board=pbsupport&action=display&thread=6564#ixzz1mQQ1XYCv
|
|