MediaWiki:Monobook.js
Appearance
Tugtar faoi deara: Tar éis duit athruithe a shábháil, caithfear gabháil thar thaisce do bhrabhsálaí chun iad a fheiceáil. Internet Explorer: cliceáil ar an gcnaipe Athnuaigh nó Athlódáil, agus an eochair Ctrl á bhrú agat. Firefox: cliceáil ar Athlódáil, agus an eochair Iomlaoid á bhrú agat (nó brúigh Ctrl-Iomlaoid-R). Opera: caithfear d'úsáideoirí a dtaiscí a ghlanadh trí Uirlisí→Sainroghanna. Ní mór d'úsáideoirí Konqueror nó Safari ach cliceáil ar an gcnaipe Athlódáil.
/*
=== leideanna uirlisí agus cnaipí rochtana ===
<pre> */
/*
[[bs:MediaWiki:Monobook.js]]
[[en:MediaWiki:Monobook.js]]
[[he:MediaWiki:Monobook.js]]
[[fr:MediaWiki:Monobook.js]]
[[de:MediaWiki:Monobook.js]]
[[ja:MediaWiki:Monobook.js]]
[[vi:MediaWiki:Monobook.js]]
[[zh:MediaWiki:Monobook.js]]
*/
// Optionen für das Sonderzeichenmenü in [[MediaWiki:Edittools]] ([[:en:MediaWiki:Monobook.js|Quelle]]; siehe [[MediaWiki:Monobook.js]])
// Spacebirdy stuff :)
function addCharSubsetMenu() { //must match [[MediaWiki:Edittools]]
var specialchars = document.getElementById('specialchars');
if (specialchars) {
var menu = "<select id=\"charSubsetControl\" style=\"display:inline\" onChange=\"chooseCharSubset(selectedIndex)\">";
menu += "<option>IPA</option>";
menu += "<option>Araibís</option>";
menu += "<option>Fraincis</option>";
menu += "<option>Gearmáinis</option>";
menu += "<option>Gréigis</option>";
menu += "<option>Lochlannis</option>";
menu += "<option>Rúisis</option>";
menu += "<option>Spáinnis</option>";
menu += "</select>";
specialchars.innerHTML = menu + specialchars.innerHTML;
/* default subset from cookie */
var s = parseInt( getCookie('edittoolscharsubset') );
if ( isNaN(s) ) s = 0;
/* update dropdown control to value of cookie */
document.getElementById('charSubsetControl').selectedIndex = s;
/* display the subset indicated by the cookie */
chooseCharSubset( s );
}
}
/* select subsection of special characters */
function chooseCharSubset(s) {
var l = document.getElementById('specialchars').getElementsByTagName('p');
for (var i = 0; i < l.length ; i++) {
l[i].style.display = i == s ? 'inline' : 'none';
l[i].style.visibility = i == s ? 'visible' : 'hidden';
}
setCookie('edittoolscharsubset', s);
}
/* inserting the drop-down-menu */
function customizeWikipedia() {
addCharSubsetMenu();
}
$(customizeWikipedia);