User:Sid the Kpop fan/common.js

//Add border color to infoboxes $('.portable-infobox').each(function {    var cls = $(this).attr('class').match(/pi-theme-_(\S+)/);    if (cls) {        $(this).css('border-color', '#' + cls[1]);    } }); /* This function returns the color, based on the Pokémon type. It is used on numerous templates. @return: the color of the asked type. If the type is not defined in this function, it returns the teal (#9DC1B7) color. function poke_type(element_class){ var color; switch(element_class) { case "Bug": color = "#CEDE48"; break;
 * element_class: the type of the color.

case "Dark": color = "#A2958D"; break;

case "Dragon": color = "#9F77FF"; break;

case "Electric": color = "#F9DA5F"; break;

case "Fairy": color = "#FEA3E8"; break;

case "Fighting": color = "#E5524A"; break;

case "Flying": color = "#CEBFFB"; break;

case "Fire": color = "#F08030"; break;

case "Ghost": color = "#A18DC4"; break;

case "Grass": color = "#77DD77"; break;

case "Ground": color = "#FFDE85"; break;

case "Ice": color = "#BCE6E6"; break;

case "Normal": color = "#C6C6A7"; break;

case "Poison": color = "#DC80DD"; break;

case "Psychic": color = "#F99CB8"; break;

case "Rock": color = "#D1C17D"; break;

case "Steel": color = "#D1D1E0"; break;

case "Water": color = "#9BB8FE"; break;

// ??? type default: color = "#9DC1B7"; }

return color; }