Post by Roxas on Jan 8, 2011 15:42:18 GMT -5
Hmm. Wouldnt it be cool if you can have a custom background for your mini profile?
Hope you guys like it
<script type="text/javascript">
<!--
//Profile Editable MiniProfile Background - DregondRahl
// Do not repost or ajust copyright
if(document.modifyForm && document.modifyForm.signature){
Form = document.modifyForm;
AH = Form.avatarheight.parentNode.parentNode.parentNode;
MpTr = AH.parentNode.insertRow(1);
MpTr.insertCell(0).innerHTML = '<font size=2>MP BackGround</font>';
MpTr.insertCell(1).innerHTML = '<input type="text" size="35" name="mpbg">';
MpTr.insertCell(2).innerHTML = '<font size=1>Enter the URL Of the Background Image for the Mini Profile</font>';
if(Form.signature.value.match(/\[MpB:(.+?)\]/))
Form.mpbg.value=RegExp. $1;
Form.signature.value = Form.signature.value.replace(/\[MpB:(.+?)\]/,'');
function doBg(){
if(!Form.mpbg.value == "" ){
BgImage = Form.mpbg.value;
Form.signature.value = '[MpB:'+BgImage+']' +Form.signature.value;
}
}
if(document.addEventListener){
Form.profileaction[0].addEventListener('click',doBg,false);
} else {
Form.profileaction[0].attachEvent('onclick',doBg);
}
}
if(location.href.match(/ion=((pm|calendar)?view|display)/)) {
var td = document.getElementsByTagName("td");
for(t=0; t<td.length; t++) {
if((td[t].colSpan == '2' || td[t].colSpan == '3') && td[t].innerHTML.match(/\[MpB:(.+?)\]/)){
BgImg = (RegExp.$1.replace(/ /g,''))
td[t].innerHTML= td[t].innerHTML.replace(/\[MpB:(.+?)\]/,' ');
var obj = td[t].parentNode;
while(!obj.nodeName.match(/^td$/i)) {
obj = obj.parentNode;
}
obj.previousSibling.style.backgroundImage = 'url("'+BgImg+'")';
}
}
}
//-->
</script>
Hope you guys like it