MediaWiki:Gadget-EditZeroth.js
Nòta : Aprèp aver publicat la pagina, vos cal forçar son recargament complet tot ignorant lo contengut actual de l'amagatal de vòstre navigador per veire los cambiaments : Mozilla / Firefox / Konqueror / Safari : mantenètz la tòca Majuscula (Shift) en clicant lo boton Actualizar (Reload,) o quichatz Maj-Ctrl-R (Maj-Cmd-R sus Apple Mac) ; Internet Explorer / Opera : mantenètz la tòca Ctrl en clicant lo boton Actualizar o quichatz Ctrl-F5.
//<source lang="javascript" line>
/*
* AddEditSection0
*
* Permet d'editar la primièra seccion d'una pagina (entèsta)
*
* Autor : ??
* Contributor : Pabix, Zelda, Cedric31
* Darrièra revision : 21 de novembre de 2007
*/
function addEditSection0() {
ta['ca-edit-0'] = ['', 'Edit the zeroth section of this page'];
if (!document.getElementById) {
return;
}
x = document.getElementById('ca-edit');
if(!x) {
return;
}
y = document.createElement('LI');
y.id = 'ca-edit-0';
if (x.className == 'selected') {
if (/&action=edit§ion=0$/.test(window.location.href)) {
x.className = 'istalk';
y.className = 'selected';
} else {
x.className = 'selected istalk';
}
} else if (x.className == 'selected istalk') {
if (/&action=edit§ion=0$/.test(window.location.href)) {
x.className = 'istalk';
y.className = 'selected istalk';
} else {
y.className = 'istalk';
}
} else {
y.className = x.className;
x.className = 'istalk';
}
z = document.createElement('A');
if (x.children) {
z.href = x.children[0].href + '§ion=0';
z.appendChild(document.createTextNode('entèsta'));
y.appendChild(z);
x.parentNode.insertBefore(y,x.nextSibling);
} else {
z.href = x.childNodes[0].href + '§ion=0';
z.appendChild(document.createTextNode('entèsta'));
y.appendChild(z);
x.parentNode.insertBefore(y,x.nextSibling);
}
}
if (document.title.indexOf("modificacion ") == -1) {
$(addEditSection0);
}
//</source>