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

Contenu supprimé Contenu ajouté
Bayo (discussion | contributions)
me semble que c'est la forme recommencdée
Bayo (discussion | contributions)
autre solution pour mettre un href
Ligne 53 :
link = document.createElement('a');
link.setAttribute("ancre", wgServer + "/w/index.php?title=" + wgPageName + "#" + ancre_nom) ;
link.setAttribute("hrefonclick", "javascript:window.prompt('Lien : ', this.getAttribute('ancre'));");
link.setAttribute("href", "javascript:;"); link.appendChild(small);
titre_courant.appendChild(link);
}
Ligne 66 :
link = document.createElement('a');
link.setAttribute("ancre", "[[" + wgPageName + "#" + ancre_nom + "]]");
link.setAttribute("hrefonclick", "javascript:window.prompt('Lien : ', this.getAttribute('ancre'));");
link.setAttribute("href", "javascript:;");
link.appendChild(small);
titre_courant.appendChild(link);