User:Nickshanks/monobook.js

function HungarianLetters {	var savebutton = document.getElementById('wpSave'); var letters = document.createElement('div'); AddLetter(letters,'á'); AddLetter(letters,'é'); AddLetter(letters,'í'); AddLetter(letters,'ó'); AddLetter(letters,'ö'); AddLetter(letters,'ő'); AddLetter(letters,'ú'); AddLetter(letters,'ü'); AddLetter(letters,'ű'); savebutton.parent.insertBefore(letters,savebutton); }

function AddLetter(parent,letter) {	var a = document.createElement('a'); a.setAttribute('href', 'javascript:insertTags("'+letter+'","","");'); a.appendChild(document.createTextNode(letter)); parent.appendChild(a); parent.appendChild(document.createTextNode(' ')); }

/* document.getElementsByTagName('body')[0].setAttribute('onload', 'HungarianLetters;'); */ if(window.addEventListener)	window.addEventListener("load",HungarianLetters,false); else if (window.attachEvent)	window.attachEvent("onload",HungarianLetters);