/* generated javascript */ var skin = 'monobook'; var stylepath = '/skins-1.5'; /* MediaWiki:Common.js */ /* N’importe quel JavaScript ici sera chargé pour n’importe quel utilisateur et pour chaque page accédée. */ /* MediaWiki:Monobook.js (deprecated; migrate to Common.js!) */ /* ===onglets=== Auteur: ThomasV
*/ function onglets() { //first tab var a = document.getElementById("ca-nstab-main"); if(a){ var s = a.innerHTML; var i = s.indexOf('Texte'); if( document.getElementById("Author") ) { a.innerHTML = s.substring(0,i)+"Auteur"+s.substring(i+5,s.length-1); } q = document.getElementById("textquality") if( q ) { var image = ""; if( q.className == "0%") { image = " "; } if( q.className == "25%") { image = " "; } if( q.className == "50%") { image = " "; } if( q.className == "75%") { image = " "; } if( q.className == "100%") { image = " "; } if( q.className == "Textes validés") { image = " "; } //a.innerHTML = a.innerHTML + image; //a.innerHTML = s.substring(0,i+5)+""+image+""+s.substring(i+5,s.length-1); a.innerHTML = s.substring(0,i+5)+image+s.substring(i+5,s.length-1); } } //2nd tab //if( document.getElementById("infoedit") ) // { // var b = document.getElementById("ca-talk"); // if(b){ // var s = b.innerHTML; // var i = s.indexOf('Discussion'); // b.innerHTML = s.substring(0,i)+"Source"+s.substring(i+10,s.length-1); // } // } } addOnloadHook(onglets); function ongletCopyright() { var a = document.getElementById("p-cactions"); if (a) { b = a.getElementsByTagName("ul"); if(b.length > 0) { if(document.getElementById("Creative Commons by-nc-sa")) { b[0].innerHTML = b[0].innerHTML + '
*/
function interwikiExtra()
{
// iterate over all -elements
for(var i=0; a = document.getElementsByTagName("span")[i]; i++) {
// if found a linkInfo span
if(a.className == "interwiki-info") {
// iterate over all -elements
var count=0;
for(var j=0; b = document.getElementsByTagName("li")[j]; j++) {
if(b.className == "interwiki-" + a.id) {
b.innerHTML = b.innerHTML + " "+a.title;
if(a.title == "(vo)") { b.title = "Texte original"; }
}
else if(b.className == "interwiki-" + a.id.substr(0,a.id.length-1)) {
count = count+1;
if(a.id.charAt(a.id.length-1) == count) {
b.innerHTML = b.innerHTML + " "+a.title;
}
}
}
}
if(a.className == "AutreVersion") {
p = a.title.indexOf("|");
pvers = document.getElementById("p-version");
if (pvers == null) {
c = document.getElementById("column-one");
c.innerHTML = c.innerHTML
+ ""
+ "Autres versions
"
+ ""
+ ""
+ "
"
+ "";
pvers = document.getElementById("p-version");
}
e = pvers.getElementsByTagName("ul")[0];
e.innerHTML = e.innerHTML
+ "" + a.title.substr(p+1,a.title.length-1)+ " " +" "
}
}
}
addOnloadHook(interwikiExtra);
/*
===Liens bilingues===
Fonctionne avec l'extension DoubleWiki. Auteur: ThomasV
*/
function BilingualLink()
{
if( wgNamespaceNumber != 0) return;
var doc_url = document.URL;
var url = '';
// iterate over all
-elements
for(var j=0; b = document.getElementsByTagName("li")[j]; j++) {
if(b.className.substring(0,10) == "interwiki-" ) {
var lang = b.className.substring(10,b.className.length);
if( doc_url.indexOf('?title=') != -1 ) {
var qm = doc_url.indexOf('&match=');
if( qm != -1 ) url = doc_url.substring(0,qm)+"&match="+lang;
else url = doc_url+"&match="+lang;
} else {
var qm = doc_url.indexOf('?');
if( qm != -1 ) url = doc_url.substring(0,qm)+"?match="+lang;
else url = doc_url+"?match="+lang;
}
b.innerHTML = b.innerHTML+" ⇔";
}
}
}
addOnloadHook(BilingualLink);
/*
===Edittools===
*/
/* add menu for selecting subsets of secial characters */
/***** must match MediaWiki:Edittools *****/
function addCharSubsetMenu() {
var specialchars = document.getElementById('specialchars');
if (specialchars) {
var menu = "";
specialchars.innerHTML = menu + specialchars.innerHTML;
/* default subset - try to use a cookie some day */
chooseCharSubset(0);
}
}
/* 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';
}
}
addOnloadHook(addCharSubsetMenu);
/****************************************/
function mwInsertEditButton(parent, item) {
var image = document.createElement("img");
image.width = 23;
image.height = 22;
image.src = item.imageFile;
image.border = 0;
image.style.cursor = "pointer";
var ref = document.createElement("a")
ref.setAttribute("href", "javascript:insertTags(\"" + item.tagOpen + "\",\"" + item.tagClose + "\",\"" + item.sampleText + "\");")
ref.setAttribute("title", item.speedTip);
ref.appendChild(image);
parent.appendChild(ref);
}
/*
===Générateur de tableaux===
*/
/**
*
* English: Generate an array using Mediawiki syntax
*
* @author: fr:user:dake
* @version: 0.1
*/
function generateTableau(nbCol, nbRow, border, styleHeader, styleLine)
{
var code = "\n";
if (styleHeader==1) {
code += '{{entête tableau charte alignement|center}}\n';
} else {
code += '{| border="' + border + '"\n';
code += '|+ Titre du tableau\n';
}
for (var i=0;i';
popup.document.write('Paramètres du tableau ');
popup.document.write('