♠♣♥K.I.D.A
Wanderer
"Fear is proof that you've looked at the real me."
Posts: 27
|
A code
Aug 8, 2008 22:08:38 GMT -5
Post by ♠♣♥K.I.D.A on Aug 8, 2008 22:08:38 GMT -5
[/b] <!-- Add music to profile --> <script type="text/javascript"><!-- /* Music in Profile Concept by FireIndy Recreated by Triad for v4.5 [url]http://support.proboards.com[/url] */
var hide = true; // Set true to hide the media. var loop = false; // Set true to loop the media forever.
if(location.href.match(/on=(displ|search2|viewpr|pmv|(user)?rece|cal\w+iew)/)){ var td = document.getElementsByTagName("td"); for(x=td.length-1; x>1; x--){ if(td[x-1].innerHTML.match(/>signature</i) && td[x].innerHTML.match(/(\[music:(.+?)\])/i)){ var d = RegExp.$2; td[x].innerHTML = td[x].innerHTML.replace(RegExp.$1, ""); if(location.href.match(/on=viewprofile/i)){ var e = "<div style='text-align: center;'><embed src='"+d.replace(/\s/gi, '')+"' "; if(hide) e += "hidden='true' "; e += "autostart='true' loop='"+loop+"' /></div>"; document.write(e); } break; } } } if(document.modifyForm){ var tb = document.getElementsByTagName("table"); for(a=4; a<tb.length; a++){ if(tb[a].width == "650" && tb[a].innerHTML.match(/location:/i)){ var _input = document.createElement("input"); _input.type = "text"; _input.size = "35"; _input.id = "music"; if(document.modifyForm.signature.value.match(/(\[music:(.+?)\])/i)){ _input.value = RegExp.$2; document.modifyForm.signature.value = document.modifyForm.signature.value.replace(RegExp.$1, ""); } var font_1 = document.createElement("font"); font_1.size = "2"; font_1.appendChild(document.createTextNode("Profile Music:")); var font_2 = document.createElement("font"); font_2.size= "1" font_2.appendChild(document.createTextNode("If you wish to have music played on your main profile page, enter the URL here.")); var _row = tb[a].insertRow(tb[a].rows.length); var _cell = _row.insertCell(0); _cell.width = "160"; _cell.appendChild(font_1); _cell = _row.insertCell(1); _cell.width = "245"; _cell.appendChild(_input); _cell = _row.insertCell(2); _cell.width = "245"; _cell.appendChild(font_2);
function addMusic(){ var p = document.modifyForm.signature; if(document.getElementById("music").value.length > 0){ p.maxLength = p.value.length + document.getElementById("music").value.length + 8; p.value += "[music:" + document.getElementById('music').value + "]"; } else if(p.value.match(/(\[music:.+?\])/i)){ p.value = p.value.replace(RegExp.$1, ""); } }
if(document.addEventListener) document.modifyForm.addEventListener("submit", addMusic, false); else if(document.attachEvent) document.modifyForm.attachEvent("onsubmit", addMusic); else document.modifyForm.onsubmit = addMusic;
break; } } } //--></script> [/ul][/size]
|
|