« MediaWiki:Gadget-AncreTitres.js » : différence entre les versions

Contenu supprimé Contenu ajouté
Bayo (discussion | contributions)
couleur normale ?
Bayo (discussion | contributions)
retouche pour retirer le tag small
Ligne 55 :
 
if (AncreTitres.afficheE) {
smalllink = document.createElement('smalla');
with(smalllink) {
innerHTML=AncreTitres.nom_ancre;
title=AncreTitres.description;
link. setAttribute("ancre", wgServer + "/w/index.php?title=" + wgPageName + "#" + ancre_nom) ;
}
link.setAttribute("ancre", "[[" + wgPageName + "#" + ancre_nom + "]]");
link = document.createElement('a');
} );
link.setAttribute("ancre", wgServer + "/w/index.php?title=" + wgPageName + "#" + ancre_nom) ;
link. setAttribute("onclick", "window.prompt("
+ "'Lien : ', this.getAttribute('ancre'));");
);
link. setAttribute("href", "javascript:;"); link.appendChild(small); }
span.appendChild(document.createText(' '));
span.appendChild(link);
}
if (AncreTitres.afficheI) {
smalllink = document.createElement('smalla');
with(smalllink) {
innerHTML=AncreTitres.nom_lien_interne;
title=AncreTitres.descinterne;
setAttribute("ancre", "[[" + wgPageName + "#" + ancre_nom + "]]");
link. setAttribute("onclick", "window.prompt('Lien : ', this.getAttribute('ancre'));");
+ "'Lien : ', this.getAttribute('ancre'));"
);
link. setAttribute("href", "javascript:;");
}
link = span.appendChild(document.createElementcreateText('a '));
link.setAttribute("ancre", "[[" + wgPageName + "#" + ancre_nom + "]]");
link.setAttribute("onclick", "window.prompt('Lien : ', this.getAttribute('ancre'));");
link.setAttribute("href", "javascript:;");
link.appendChild(small);
span.appendChild(link);
}