|
bg post
Jan 27, 2012 19:46:23 GMT -4
Post by MonsterControl on Jan 27, 2012 19:46:23 GMT -4
<script type="text/javascript"> <!--
/*Custom Post Background Color UBBC - By iAlex - Open Source*/
var iCustomImage = "http://img217.imageshack.us/img217/8606/ibgcolorhuhubbclawlwm0.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>
|
|