|
font
Feb 15, 2012 1:58:10 GMT -4
Post by MonsterControl on Feb 15, 2012 1:58:10 GMT -4
<script type="text/javascript"> <!--
/* UBBC, Font, and Font Size Drop Down by hpmad Do not repost or claim without permission from creator. This header must remain intact. */
if(document.postForm){ var tehUbbc = document.postForm.color.parentNode.getElementsByTagName('a');
var ubbcSel = document.createElement('select'); ubbcSel[0] = new Option("UBBC Codes");
for(i=0;i<tehUbbc.length;i++){ if(!tehUbbc[i].firstChild.alt.match(/Font/)){ var ubbcTag = tehUbbc[i].href; var ubbcTxt = tehUbbc[i].firstChild.alt.replace(/\]/,'').replace(/\]/,'');
ubbcSel[ubbcSel.length] = new Option(ubbcTxt,ubbcTag); tehUbbc[i].parentNode.removeChild(tehUbbc[i]); i--; }else{ tehUbbc[i].parentNode.removeChild(tehUbbc[i]); i-- } }
ubbcSel.onchange = function(){ if(this[this.selectedIndex].value){ eval(this[this.selectedIndex].value); } }
var ubbcCell = document.postForm.color.parentNode; ubbcCell.insertBefore(ubbcSel,document.postForm.color); ubbcCell.insertBefore(document.createTextNode(' '),document.postForm.color);
var fontFSel = document.createElement('select'); fontFSel[0] = new Option('Font Face'); fontFSel[1] = new Option('Verdana','Verdana'); fontFSel[2] = new Option('Arial','Arial'); fontFSel[3] = new Option('Tahoma','Tahoma'); fontFSel[4] = new Option('Times New Roman','Times New Roman'); fontFSel[5] = new Option('Comic Sans MS','Comic Sans MS');
fontFSel.onchange = function(){ if(this[this.selectedIndex].value){ add('[font='+this[this.selectedIndex].value+']','[/font]') } }
var fontSSel = document.createElement('select'); fontSSel[0] = new Option('Font Size'); fontSSel[1] = new Option('1','1'); fontSSel[2] = new Option('2','2'); fontSSel[3] = new Option('3','3'); fontSSel[4] = new Option('4','4'); fontSSel[5] = new Option('5','5'); fontSSel[6] = new Option('6','6');
fontSSel.onchange = function(){ if(this[this.selectedIndex].value){ add('[size='+this[this.selectedIndex].value+']','[/size]') } }
ubbcCell.insertBefore(fontFSel,document.postForm.color); ubbcCell.insertBefore(document.createTextNode(' '),document.postForm.color);
ubbcCell.insertBefore(fontSSel,document.postForm.color); ubbcCell.insertBefore(document.createTextNode(' '),document.postForm.color);
ubbcCell.parentNode.parentNode.previousSibling.style.display = 'none'; }
//--> </script>
Read more: http://smangii.proboards.com/index.cgi?board=pbsupport&action=display&thread=12112#ixzz1mQYLl1W4
|
|