Post by Trip on Nov 22, 2014 11:50:15 GMT -5
NOTE: I didn't backup my original post for this version of Auto-Colors, but this is the best and final version. This version is not only improved, but also cross-browser and compatible with both FireFox and Internet Explorer!
EDIT: Found my original post release!!
Wheeeeeeeew! OMG I've been at this for a looong time and I've finally finished it!
As many of you know, I have created Auto-Colors [PB] hack, so now, I decided to put more of my skills into improving it; I now present to you all.............
Auto-Colors v2
Code Specifications:
Code Speed: Very Fast
Compatibility: Internet Explorer AND Mozilla Firefox (Cross-Browser)
Browser Speed Limit: No Limit
TOS Check: Permitted
UserType: Friendly
+Bonus FireFox feature
Goes In All desired OTHER (not Main) Board Footers:
^: LOL, it's a few folds more advanced than version 1, which I posted here a long time ago....dunno what happened to it here, lol.
AH, now for the bonus feature...
I made this code specifically to try a new style of coding + to improve the hell out of it to aid the new "Cross-Browser Age".....there are Foxes and Globes flying all over the place nowadays, so I had to begin to blend in, which in my opinion, is a b****!
For Internet Explorer users, this code will work identical to v1.
For Mozilla users, this code will work with an exceptional improvement; let me explain the code first...
When you post something like "I wore some blue jeans with a red sash yesterday.", it will appear like this when posted --> "I wore some blue jeans with a red sash yesterday."
Now for my IE peeps, you can post each color twice per post!!
...like this --> "I am the blue man of the Blue road with red and Red stripes"
^: Notice the bolded letters; you can only use the same colors twice per post since it will support 1 uppercase and 1 lowercase 1st letter of each color. (sounds confusing eh?)
Henceforth, you can have up to 32 auto-colors per post!!
Now for my Mozilla peeps, you can use the auto-colors indefinitely.
Also, you can spell them anyway you want; even like this --> rEd or bLuE or BlaCk.
I figured how to pull it off without using a WHILE() loop (universal brower crash xD).
The only exception to this is that all of your auto-colors will be 'auto-lowercased', whereas the IE users can have "Blue and blue", you can only have "blue". Understand? It's not bad at all.
Here's a Preview Board --> machinax.proboards34.com/index.cgi?board=tester&action=post&thread=1097377034&start=30
^: You can test it there as a guest.
I put hours into this code.....please try to enjoy.
Thank you all so very much! ^_^
EDIT: Purple fixed.
EDIT: Found my original post release!!
Wheeeeeeeew! OMG I've been at this for a looong time and I've finally finished it!
As many of you know, I have created Auto-Colors [PB] hack, so now, I decided to put more of my skills into improving it; I now present to you all.............
Auto-Colors v2
Code Specifications:
Code Speed: Very Fast
Compatibility: Internet Explorer AND Mozilla Firefox (Cross-Browser)
Browser Speed Limit: No Limit
TOS Check: Permitted
UserType: Friendly
+Bonus FireFox feature
Goes In All desired OTHER (not Main) Board Footers:
<script>
<!--
//Auto-Colors v2.0 [Cross-Browser Version]
//Created By Trip aka Naoki
//Board Footers (not MAIN)
//Do not post this anywhere else without my permission
//vComponent
var vFigure = "";
//Set Global exComponent
var chIE = navigator.appName;
//Fixed Set
aSet = new Array("action=post","action=createpoll","quote=");
for(area=0;area<aSet.length;area++){
//Access Mod
if(location.href.match(aSet[area])){
iSheet = document.getElementsByTagName('input');
for(dField=0;dField<iSheet.length;dField++){
if(iSheet[dField].name=="post" && iSheet[dField].id==""){
iSheet[dField].id = "atcMod";
if(chIE=="Microsoft Internet Explorer"){
iSheet[dField].outerHTML = iSheet[dField].outerHTML.replace("document","doColor();document");
}
}
}
sHomonculus();
}
}
//Change Default Input Configuration
function sHomonculus(){
denser = document.getElementById('atcMod');
denser.setAttribute('onClick','javascript:xColor();');
}
//Begin Color Dimensional
function xColor(){
var vortex = document.getElementsByTagName('textarea');
var cD = new Array(20);
cD[0]=/black/gi;cD[1]=/navy/gi;cD[2]=/indigo/gi;cD[3]=/olive/gi;cD[4]=/green/gi;
cD[5]=/teal/gi;cD[6]=/blue/gi;cD[7]=/red/gi;cD[8]=/purple/gi;
cD[9]=/gray/gi;cD[10]=/orange/gi;cD[11]=/yellow/gi;cD[12]=/lime/gi;
cD[13]=/silver/gi;cD[14]=/pink/gi;cD[15]=/white/gi;cD[16]=/gold/gi;
cD[17]=/brown/gi;cD[18]=/lavender/gi;cD[19]=/violet/gi;
for(x=0;x<vortex.length;x++){
for(q=0;q<cD.length;q++){
if(vortex[x].name=="message"){
if(vortex[x].value.match(cD[q])){
var dark = "[color="+cD[q]+"]"+cD[q]+"[\/color]";
vortex[x].value = vortex[x].value.replace(cD[q],dark);
if(vortex[x].value.match(/\/(\w+)\/gi/)){
var holy = "[color="+RegExp.$1+"]"+RegExp.$1+"[\/color]";
vFigure = RegExp.$1;
vortex[x].value = vortex[x].value.replace(dark,holy);
if(vortex[x].value.indexOf("/"+RegExp.$1+"/gi")){
vortex[x].value = vortex[x].value.replace(/\/(\w+)\/gi/gi,vFigure);
}
}
}
}
}
}
}
//IExplorer Setup
function doColor(){
if(chIE=="Microsoft Internet Explorer"){
var granite = document.body.getElementsByTagName('textarea');
var seam = new Array(32);
seam[0] = "black";seam[1] = "Black";
seam[2] = "navy";seam[3] = "Navy";
seam[4] = "indigo";seam[5] = "Indigo";
seam[6] = "olive";seam[7] = "Olive";
seam[8] = "green";seam[9] = "Green";
seam[10] = "teal";seam[11] = "Teal";
seam[12] = "blue";seam[13] = "Blue";
seam[14] = "red";seam[15] = "Red";
seam[16] = "purple";seam[17] = "Purple";
seam[18] = "gray";seam[19] = "Gray";
seam[20] = "orange";seam[21] = "Orange";
seam[22] = "yellow";seam[23] = "Yellow";
seam[24] = "lime";seam[25] = "Lime";
seam[26] = "silver";seam[27] = "Silver";
seam[28] = "pink";seam[29] = "Pink";
seam[30] = "white";seam[31] = "White";
for(x=0;x<granite.length;x++){
for(e=0;e<seam.length;e++){
if(granite[x].innerText.match(seam[e])){
var umber = "[color="+seam[e]+"]"+seam[e]+"[\/color]";
granite[x].innerText = granite[x].innerText.replace(seam[e],umber);
}
}
}
}
}
//-->
</script>
^: LOL, it's a few folds more advanced than version 1, which I posted here a long time ago....dunno what happened to it here, lol.
AH, now for the bonus feature...
I made this code specifically to try a new style of coding + to improve the hell out of it to aid the new "Cross-Browser Age".....there are Foxes and Globes flying all over the place nowadays, so I had to begin to blend in, which in my opinion, is a b****!
For Internet Explorer users, this code will work identical to v1.
For Mozilla users, this code will work with an exceptional improvement; let me explain the code first...
When you post something like "I wore some blue jeans with a red sash yesterday.", it will appear like this when posted --> "I wore some blue jeans with a red sash yesterday."
Now for my IE peeps, you can post each color twice per post!!
...like this --> "I am the blue man of the Blue road with red and Red stripes"
^: Notice the bolded letters; you can only use the same colors twice per post since it will support 1 uppercase and 1 lowercase 1st letter of each color. (sounds confusing eh?)

Henceforth, you can have up to 32 auto-colors per post!!
Now for my Mozilla peeps, you can use the auto-colors indefinitely.

Also, you can spell them anyway you want; even like this --> rEd or bLuE or BlaCk.
I figured how to pull it off without using a WHILE() loop (universal brower crash xD).
The only exception to this is that all of your auto-colors will be 'auto-lowercased', whereas the IE users can have "Blue and blue", you can only have "blue". Understand? It's not bad at all.
Here's a Preview Board --> machinax.proboards34.com/index.cgi?board=tester&action=post&thread=1097377034&start=30
^: You can test it there as a guest.

I put hours into this code.....please try to enjoy.
Thank you all so very much! ^_^
EDIT: Purple fixed.

[NO PREVIEWS AVAILABLE]