106
modifications
(autre solution pour mettre un href) |
(jout d'un span englobant pour être cohérent avec editsection) |
||
description : "Obtenir une URL vers cette section",
descinterne : "Obtenir un [[Lien#interne]]",
linkcolor : "
fontSize : "
fontWeight : "normal",
afficheE : true,
afficheI : true,
var i = 0;
var titre_courant;
if (!AncreTitres.afficheI && !AncreTitres.afficheE) return;
for (i = 0 ; i < titres.length ; i++){
var titre_courant = titres[i].parentNode;
var small;
var link;
span = document.createElement('span');
with(span ) {
}
if (AncreTitres.afficheE) {
small = document.createElement('small'); with(small) {
innerHTML=AncreTitres.nom_ancre;
title=AncreTitres.description;
▲ style.color=AncreTitres.linkcolor;
▲ style.fontSize=AncreTitres.fontSize;
}
link = document.createElement('a');
link.setAttribute("onclick", "window.prompt('Lien : ', this.getAttribute('ancre'));");
link.setAttribute("href", "javascript:;"); link.appendChild(small);
}
if (AncreTitres.afficheI) {
innerHTML=AncreTitres.nom_lien_interne;
title=AncreTitres.descinterne;
▲ style.color=AncreTitres.linkcolor;
}
link = document.createElement('a');
link.setAttribute("href", "javascript:;");
link.appendChild(small);
}
titre_courant.appendChild(span);
}
}
|
modifications