User:Ultimate Dark Carnage/Sandbox2.js

(function(mw, $, window){  if(mw.config.get('wgPageName') === 'Special:Sandbox'){	   switch(skin) {	      //This part of the code will only apply to Monobook	      case 'monobook':      $('#bodyContent').html('See in Wikia Skin Welcome Border Radius   px  pt  em %  in  cm  pc  ex  mm  Background  Border  Font Face  Serif Sans-Serif  Georgia  Monospace  Fantasy  Tahoma  Verdana  Arial Lucida Grande  Comic Sans Times New Roman Palatino Linotype   '); break; case 'oasis': case 'wikia': $('.WikiaArticle').html(' See in Monobook Skin</a> Welcome <label class="username" for="username">Username <input id="username" placeholder="Enter your username." type="text" /> <label class="username-link" for="username-link">Username Link <input id="username-link" placeholder="Enter the username link title." type="text"/> <label class="usertalk" for="usertalk">User Talk Link <input id="usertalk" placeholder="Enter your user talk link title."/> <label class="border-radius" for="border-radius">Border Radius <input id="border-radius" type="text" placeholder="Enter your value" /> px  pt  em <option value="%">%  in  cm  pc  ex  mm  <label class="background" for="background">Background <input id="background" placeholder="Enter a background color" /> <label class="border-width" for="border-width">Border <input id="border-width" placeholder="Enter your border width value." type="number" min="0" /><select id="border-mesurement"> px pt  em <option value="%">%  in  cm  pc  ex  mm  <select id="border-style"> &mdash;  Hidden  Solid  Dotted  Dashed  Ridge  Groove  Double  Inset  Outset  <input id="border-color" placeholder="Enter Border Color value" /> <label class="font-face" for="font-face">Font Face <select id="font-face"> Serif <option value="sans-serif" selected>Sans-Serif  Georgia  Monospace  Fantasy  Tahoma  Verdana  Arial <option value="lucida grande">Lucida Grande  Comic Sans <option value="times new roman">Times New Roman <option value="palatino linotype">Palatino Linotype  <label class="box-shadow" for="box-shadow">Box Shadow <input id="box-shadow" type="text" placeholder="Enter box shadow value." disabled /> <label for="enable-boxshadow" class="enable-boxshadow">Enable Box Shadow? <option value="No">No <option value="Yes">Yes Submit Code</a> <textarea class="result" readonly>  ');      $('#enable-boxshadow').change(function{ if($('#enable-boxshadow option').val === "Yes"){ $('#box-shadow').is(':enabled'); }       else { $('#box-shadow').is(':disabled'); }     });      break;     }	    function submitCode{       var username = document.getElementById('username');       username.value;       var username_link = document.getElementById('username-link');       username_link.value;       var usertalk = document.getElementById('usertalk');       usertalk.value;       var background = document.getElementById('background');       background.value;       var border_radius = document.getElementById('border-radius');       border_radius.value;       var measure = document.getElementById('measure');       var measure2 = measure.options[measure.selectedIndex].value;       var border_width = document.getElementById('border-width');       var border_measurement = document.getElementById('border-measurement');       var border_measurement_options = border_measurement.options[border_measurement.selectedIndex].value;       var border_style = document.getElementById('border-style'); var border_color = document.getElementById('border-color'); var font_face = document.getElementById('font-face'); var result = document.getElementsByClassName('result'); result[0].innerHTML = '<span style="background: ' + background + '; border: ' + border_width +  + border_measurement_options + ' ' + border_style + ' ' + border_color + '; border-radius: ' + border_radius +  + measure2 + '; font-family: ' + font-face + ';"> ' + username_link + ' | ' + usertalk + ' '; var test = document.getElementsByClassName('test'); test[0].innerHTML=result.innerHTML; }  } }(mediaWiki, jQuery));