User:Jesdisciple/global.js

window.onload = function { if(window.location.hostname == 'javascript.wikia.com'){ var editor = document.getElementById('editor'); if(editor){ var row = editor.rows[1]; editor.rows[0].cells[0].style.backgroundColor = row.style.borderColor = '#c9c9ff'; row.style.backgroundColor = '#f3f3ff'; var cell1 = row.cells[0]; var input = document.createElement('textarea'); cell1.width = cell1.style.width = "50%"; while(cell1.firstChild){ cell1.removeChild(cell1.firstChild); }           cell1.appendChild(input); var button = document.createElement('button'); button.value = 'Render'; button.onclick = function { cell2.innerHTML = input.value; };           cell1.appendChild(button); var cell2 = row.insertCell(1); }   } };