User:Smiddle/monobook.js

if (mwCustomEditButtons) { mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://images.wikia.com/central/images/c/c8/Button_redirect.png", "speedTip": "Redirect", "tagOpen": "#REDIRECT ",    "tagClose": "", "sampleText": "Insert text"}; }

/* From Forum:Template changing depending on viewer's language */ function loadLangSelector{ var se = document.getElementById('content').getElementsByTagName('span'); for (var i = 0; i < se.length; se++){ if ((' '+se[i].className+' ').indexOf(' langselect ') != -1){ var le = se[i].getElementsByTagName('span'); var matched = false; var def = false; for (var j = 0; j < le.length; j++){ if (le[j].lang == wgUserLanguage){ le[j].style.display = 'inline'; matched = true; }else if (le[j].lang == ''){ def = le[j]; }else{ le[j].style.display = 'none'; }     }      if (!matched && def) def.display = 'inline'; } } }

addOnloadHook(loadLangSelector);