Post by Zaxinou on Jul 12, 2011 10:44:17 GMT 10
This code was made by iAlex and I'm reposting here.
Will add a drop down colour UBBC menu with your quick reply.
Preview: Click
Cross Browser.
Global Footer.
Proboards.
<script type="text/javascript">
<!--
/*Drop down Colors with Quick Reply - By iAlex - Open Source*/
iHave_A_Cookie={
iIn_My_Custom_Title: function(){
if(window.location.href.match(/action=display/)){
this.iIt_Is_A_Special_iCookie();
}
},
iIt_Is_Not_A_Regular_Cookie: ["Lime Green", "Maroon", "Navy", "Teal", "Brown", "Beige", "Purple", "Orange", "Green", "Pink", "Yellow", "Red", "Black"],
iIt_Is_A_Special_iCookie: function(){
var iAnd_I_Love_It=document.createElement('select');
iAnd_I_Love_It.options[0]=new Option('Colors');
var iThank_You=this.iIt_Is_Not_A_Regular_Cookie.length-1;
do{
iAnd_I_Love_It.options[iAnd_I_Love_It.length]=new Option(this.iIt_Is_Not_A_Regular_Cookie[iThank_You], this.iIt_Is_Not_A_Regular_Cookie[iThank_You].replace(/\s/g, ''));
iThank_You--;
}
while(iThank_You>=0);
var iStop_Reading_My_Variables=document.getElementsByTagName('textarea');
var i=iStop_Reading_My_Variables.length;
while(i--){
if(iStop_Reading_My_Variables.item(i).name=="message"){
var iFine_I_Will_Stop_Then=iStop_Reading_My_Variables.item(i);
break;
}
}
var iStill_Here_Huh=document.createElement('div');
var iEmo_Tear=document.createElement('div');
iEmo_Tear.innerHTML='<font size="2">Colors:</font><b'+'r/s>';
iEmo_Tear.appendChild(iAnd_I_Love_It);
iEmo_Tear.appendChild(document.createElement('br'));
iEmo_Tear.appendChild(document.createElement('br'));
iFine_I_Will_Stop_Then.parentNode.parentNode.parentNode.insertBefore(iEmo_Tear, iFine_I_Will_Stop_Then.parentNode.parentNode);
iAnd_I_Love_It.onchange=function(){
var iText=iFine_I_Will_Stop_Then;
iText.focus();
if(document.selection){
var iSel=document.selection.createRange();
if(iSel.parentElement() && iSel.parentElement().name=="message"){
iSel.text=''+iSel.text+'';
}
}
else if(iText.selectionEnd){
iText.value=iText.value.slice(0, iText.selectionStart) + ''+iText.value.slice(iText.selectionStart, iText.selectionEnd)+'' + iText.value.slice(iText.selectionEnd, iText.value.length);
}
else{
iText.value=iText.value+'';
}
this.selectedIndex=0;
}
}
};
iHave_A_Cookie.iIn_My_Custom_Title();
//-->
</script>
Will add a drop down colour UBBC menu with your quick reply.
Preview: Click
Cross Browser.
Global Footer.
Proboards.
<script type="text/javascript">
<!--
/*Drop down Colors with Quick Reply - By iAlex - Open Source*/
iHave_A_Cookie={
iIn_My_Custom_Title: function(){
if(window.location.href.match(/action=display/)){
this.iIt_Is_A_Special_iCookie();
}
},
iIt_Is_Not_A_Regular_Cookie: ["Lime Green", "Maroon", "Navy", "Teal", "Brown", "Beige", "Purple", "Orange", "Green", "Pink", "Yellow", "Red", "Black"],
iIt_Is_A_Special_iCookie: function(){
var iAnd_I_Love_It=document.createElement('select');
iAnd_I_Love_It.options[0]=new Option('Colors');
var iThank_You=this.iIt_Is_Not_A_Regular_Cookie.length-1;
do{
iAnd_I_Love_It.options[iAnd_I_Love_It.length]=new Option(this.iIt_Is_Not_A_Regular_Cookie[iThank_You], this.iIt_Is_Not_A_Regular_Cookie[iThank_You].replace(/\s/g, ''));
iThank_You--;
}
while(iThank_You>=0);
var iStop_Reading_My_Variables=document.getElementsByTagName('textarea');
var i=iStop_Reading_My_Variables.length;
while(i--){
if(iStop_Reading_My_Variables.item(i).name=="message"){
var iFine_I_Will_Stop_Then=iStop_Reading_My_Variables.item(i);
break;
}
}
var iStill_Here_Huh=document.createElement('div');
var iEmo_Tear=document.createElement('div');
iEmo_Tear.innerHTML='<font size="2">Colors:</font><b'+'r/s>';
iEmo_Tear.appendChild(iAnd_I_Love_It);
iEmo_Tear.appendChild(document.createElement('br'));
iEmo_Tear.appendChild(document.createElement('br'));
iFine_I_Will_Stop_Then.parentNode.parentNode.parentNode.insertBefore(iEmo_Tear, iFine_I_Will_Stop_Then.parentNode.parentNode);
iAnd_I_Love_It.onchange=function(){
var iText=iFine_I_Will_Stop_Then;
iText.focus();
if(document.selection){
var iSel=document.selection.createRange();
if(iSel.parentElement() && iSel.parentElement().name=="message"){
iSel.text=''+iSel.text+'';
}
}
else if(iText.selectionEnd){
iText.value=iText.value.slice(0, iText.selectionStart) + ''+iText.value.slice(iText.selectionStart, iText.selectionEnd)+'' + iText.value.slice(iText.selectionEnd, iText.value.length);
}
else{
iText.value=iText.value+'';
}
this.selectedIndex=0;
}
}
};
iHave_A_Cookie.iIn_My_Custom_Title();
//-->
</script>