Inscris-toi pour écrire dans l'encyclopédie Wikimini!

« MediaWiki:Wikimini.js » : différence entre les versions

Jump to navigation Jump to search
Aucun résumé des modifications
Aucun résumé des modifications
 
(21 versions intermédiaires par 4 utilisateurs non affichées)
Ligne 72 : Ligne 72 :
// ============================================================
// ============================================================


// ============================================================
// BEGIN Dynamic Navigation Bars

// set up the words in your language
var NavigationBarHide = '▲ Masquer';
var NavigationBarShow = '▼ Afficher';

// set up max count of Navigation Bars on page,
// if there are more, all will be hidden
// NavigationBarShowDefault = 0; // all bars will be hidden
// NavigationBarShowDefault = 1; // on pages with more than 1 bar all bars will be hidden
var NavigationBarShowDefault = 0;


// shows and hides content and picture (if available) of navigation bars
// Parameters:
// indexNavigationBar: the index of navigation bar to be toggled
function toggleNavigationBar(indexNavigationBar)
{
var NavToggle = document.getElementById("NavToggle" + indexNavigationBar);
var NavFrame = document.getElementById("NavFrame" + indexNavigationBar);

if (!NavFrame || !NavToggle) {
return false;
}

// if shown now
if (NavToggle.firstChild.data == NavigationBarHide) {
for (
var NavChild = NavFrame.firstChild;
NavChild != null;
NavChild = NavChild.nextSibling
) {
if (NavChild.className == 'NavPic') {
NavChild.style.display = 'none';
}
if (NavChild.className == 'NavContent') {
NavChild.style.display = 'none';
}
if (NavChild.className == 'NavToggle') {
NavChild.firstChild.data = NavigationBarShow;
}
}

// if hidden now
} else if (NavToggle.firstChild.data == NavigationBarShow) {
for (
var NavChild = NavFrame.firstChild;
NavChild != null;
NavChild = NavChild.nextSibling
) {
if (NavChild.className == 'NavPic') {
NavChild.style.display = 'block';
}
if (NavChild.className == 'NavContent') {
NavChild.style.display = 'block';
}
if (NavChild.className == 'NavToggle') {
NavChild.firstChild.data = NavigationBarHide;
}
}
}
}

// adds show/hide-button to navigation bars
function createNavigationBarToggleButton()
{
var indexNavigationBar = 0;
// iterate over all <div>-elements
for(
var i=0;
NavFrame = document.getElementsByTagName("div")[i];
i++
) {
// if found a navigation bar
if (NavFrame.className == "NavFrame") {

indexNavigationBar++;
var NavToggle = document.createElement("a");
NavToggle.className = 'NavToggle';
NavToggle.setAttribute('id', 'NavToggle' + indexNavigationBar);
NavToggle.setAttribute('href', 'javascript:toggleNavigationBar(' + indexNavigationBar + ');');

var NavToggleText = document.createTextNode(NavigationBarHide);
NavToggle.appendChild(NavToggleText);

// add NavToggle-Button as first div-element
// in <div class="NavFrame">
NavFrame.insertBefore(
NavToggle,
NavFrame.firstChild
);
NavFrame.setAttribute('id', 'NavFrame' + indexNavigationBar);
}
}
// if more Navigation Bars found than Default: hide all
if (NavigationBarShowDefault < indexNavigationBar) {
for(
var i=1;
i<=indexNavigationBar;
i++
) {
toggleNavigationBar(i);
}
}

}

aOnloadFunctions[aOnloadFunctions.length] = createNavigationBarToggleButton;

// END Dynamic Navigation Bars
// ============================================================

// ============================================================
if(wgNamespaceNumber==6){ //////////// ESPACE DE NOMS "FICHIER" //////////////

// Dans la page de description d'une image, ajoute un texte d'aide pour insérer une image
addOnloadHook(function() {
var SectionHistory = document.getElementById('filehistory');
if(!SectionHistory) return;
var MessageAide = document.createElement('div');
MessageAide.className="fck_mw_template";
MessageAide.innerHTML = '<table cellspacing="10" cellpadding="1" width="100%" align="center" style="background-color: #F7F7F7; border: solid 1px #DDDDDD;">'
+'<tr>'
+'<td valign="top" width="45" > <img height="44" border="0" width="30" src="/w/images/e/e9/Bg-pin.gif" alt=""/>'
+'</td>'
+'<td style="text-align:justify;" > Pour insérer cette image dans un article, clique sur l\'icône <img height="21" border="0" width="21" src="/w/images/e/e7/Fckeditor-Image.gif" alt="Image:Fckeditor-Image.gif"/> de la barre d\'outils et cherche l\'image nommée <b>\«&nbsp;' + wgTitle + '&nbsp;\»</b>.'
+'</td>'
+'</table>';
SectionHistory.parentNode.insertBefore(MessageAide, SectionHistory);
});

} //////////// FIN DE L'ESPACE DE NOMS "FICHIER" //////////////
// ============================================================
// ============================================================


// =============================================== BOT : recherche de page sans images
// =============================================== BOT : recherche de page sans images
if(wgUserGroups!=null){
if(mw.config.get('wgUserGroups')!=null){
if(wgUserGroups.indexOf('sysop')!=-1){
if(mw.config.get('wgUserGroups').indexOf('sysop')!=-1){
if(wgPageName=="Wikimini:Pages_à_illustrer"){
if(mw.config.get('wgPageName')=="Wikimini:Pages_à_illustrer"){
importScript('MediaWiki:Bot/PagesSansImage.js');
//importScript('MediaWiki:Bot/PagesSansImage.js');
mw.loader.load( '/w/index.php?title=MediaWiki:Bot/PagesSansImage.js&action=raw&ctype=text/javascript' );
}
}
}
// ===============================================

// ===========================================================================
//////////////////////////////////////////////////// Patch extension WhosOnline



// 2010-06-01 : Je désactive le patch qui semble être la cause de la surcharge du serveur (lj)
/* *******************************************************
function WhosOnline_CheckNewPage(position){
var ListePresents = document.getElementById('WhosOnlineList');
if(!ListePresents) return;
if(!position) position=0;
var Lien = ListePresents.getElementsByTagName('a')[position];
if(!Lien) return;
var LienHref = Lien.href;
LienHref = LienHref.split(wgServer).join('').split('/wiki/').join('');
Requete = sajax_init_object();
var url = wgServer+'/w/api.php?action=query&redirects&titles='+LienHref;
Requete.open('GET',url, true);
Requete.send(null);
Requete.onreadystatechange = function(){
if((Requete.readyState == 4)&&(Requete.status == 200)){
var Reponse = document.createElement('div');
Reponse.innerHTML = Requete.responseText;
var Spans = Reponse.getElementsByTagName('span');
for(a=0;a<Spans.length;a++){
var SpanHTML = Spans[a].innerHTML;
if(SpanHTML.indexOf('missing=""')!=-1){
Lien.className = "new";
}
}
WhosOnline_CheckNewPage((position+1));
}
}
}
}
}
}
addOnloadHook(WhosOnline_CheckNewPage);
************************************************************ */

// Fonction similaire n'utilisant qu'une seule requête : à décommenter pour tests sur la charge serveur
/* *******************************************************
function WhosOnline_CheckNewPage(){
var ListePresents = document.getElementById('WhosOnlineList');
if(!ListePresents) return;
var A = ListePresents.getElementsByTagName('a');
if(!A) return;
var TitreLiens = new Array();
var ListeLiens = ''
for(var b=0;b<A.length;b++){
var CeLien = decodeURIComponent(A[b].href.replace(/_/g, " "));
CeLien = CeLien.split(wgServer+'/wiki/').join('');
TitreLiens.push(CeLien);
if(b!=0) ListeLiens += '|';
ListeLiens += CeLien.replace(/&/g, "%26");
}
Requete = sajax_init_object();
var url = wgServer+'/w/api.php?action=query&redirects&titles='+ListeLiens;
Requete.open('GET',url, true);
Requete.onreadystatechange = function(){
if((Requete.readyState != 4)||(Requete.status != 200)) return;
var Reponse = document.createElement('div');
Reponse.innerHTML = Requete.responseText;
var Spans = Reponse.getElementsByTagName('span');
for(a=0;a<Spans.length;a++){
var SpanHTML = Spans[a].innerHTML;
if(SpanHTML.indexOf('title="')!=-1){
var Titre = SpanHTML.split('title="')[1].split('"')[0];
Titre = API_HTMLDecode(Titre);
if(SpanHTML.indexOf('missing=""')!=-1){
for(var c=0;c<TitreLiens.length;c++){
if(Titre==TitreLiens[c]){
A[c].className = "new";
}
}
}
}
}
}
Requete.send(null);
}
addOnloadHook(WhosOnline_CheckNewPage);
************************************************************ */
// ===============================================
// ===============================================


// ============================================================================
// ============================================================================
///////////////////////////////// Évite le double-post dans les pages de discussion LQT
///////////////////////////////// Évite le double-post dans les pages de discussion LQT
addOnloadHook( function(){
//addOnloadHook( function(){
jQuery( function( ) {
var wpSave = document.getElementById('wpSave');
var wpSave = document.getElementById('wpSave');
var wpForm = document.getElementById('editform');
var wpForm = document.getElementById('editform');
Ligne 314 : Ligne 101 :
// ===========================================================================
// ===========================================================================


///////////////////////////////// Fonctions Javascript liées à des modèles

//importScript('MediaWiki:Modeles.js');
///////////////////////////////// Menu options ergonomiques
mw.loader.load( '/w/index.php?title=MediaWiki:Modeles.js&action=raw&ctype=text/javascript' );
importScript('MediaWiki:MenuOptions.js');
// ===========================================================================
// ===========================================================================



///////////////////////////////// Feuille de style Wikimini
///////////////////////////////// Feuille de style Wikimini
importStylesheet('MediaWiki:Wikimini.css');
//importStylesheet('MediaWiki:Wikimini.css');
mw.loader.load( '/w/index.php?title=MediaWiki:Wikimini.css&action=raw&ctype=text/css', 'text/css' );
// ===========================================================================
// ===========================================================================


///////////////////////////////// Patch forum, en attendant solution PHP
///////////////////////////////// Patch forum, en attendant solution PHP


addOnloadHook(AWCForum_Patch);
//addOnloadHook(AWCForum_Patch);
jQuery( function( ) {
AWCForum_Patch();
});


function AWCForum_Patch(){
function AWCForum_Patch(){
Ligne 338 : Ligne 128 :
var Link = AllDivs[a].getElementsByTagName('a')[0];
var Link = AllDivs[a].getElementsByTagName('a')[0];
var Target = DecodeHTMLEntities(decodeURIComponent(Link.href));
var Target = DecodeHTMLEntities(decodeURIComponent(Link.href));
Link.href = encodeURIComponent(Target);
Link.href = Target;
var Text = Target.replace(/.*id[^\/]+\//, "").replace(/\.html/, "");
var Text = Target.replace(/.*id[^\/]+\//, "").replace(/\.html/, "");
Link.title = Text;
var CuttedText = Text.substring(0, 20);
var CuttedText = Text.substring(0, 20);
if(Text!=CuttedText) CuttedText += "...";
if(Text!=CuttedText) CuttedText += "...";
Ligne 572 : Ligne 363 :
}
}
// ===========================================================================
// ===========================================================================


///////////////////////////////// Affichage alerte pour vrais liens externes

//addOnloadHook(function(){
jQuery( function( ) {
var Links = document.getElementsByTagName("a");
for(var a=0,l=Links.length;a<l;a++){
if(checkLink(Links[a])){
Links[a].onclick = function(){
var Confirm = confirm("Attention : Tu vas quitter le site Wikimini FR. Es-tu sûr(e) de vouloir continuer ?");
return Confirm;
}
}
}


function checkLink(obj){
var href = obj.href.toLowerCase();
var hostname = "wikimini.";
return ((href.indexOf("http://")!=-1 && href.indexOf(hostname)==-1) ? true : false);
}
});

Dernière version du 22 février 2017 à 10:28

// ============================================================
/* tooltips and access keys */
ta = new Object();
ta['pt-userpage'] = new Array('.','Ta page personnelle où tu peux te présenter');
ta['pt-anonuserpage'] = new Array('.','La page utilisateur pour l’adresse IP que tu utilises');
ta['pt-mytalk'] = new Array('n','Ta page de discussion personnelle');
ta['pt-anontalk'] = new Array('n','La page de discussion de cette adresse IP');
ta['pt-preferences'] = new Array('','Tes préférences');
ta['pt-watchlist'] = new Array('l','La liste des pages que tu suis ou "surveilles"');
ta['pt-mycontris'] = new Array('y','La liste de tes contributions');
ta['pt-login'] = new Array('o','Tu dois te connecter pour participer à Wikimini');
ta['pt-anonlogin'] = new Array('o','Tu dois te connecter pour participer à Wikimini');
ta['pt-logout'] = new Array('o','Se déconnecter');
ta['ca-talk'] = new Array('t','Discussions sur cette page');
ta['ca-edit'] = new Array('e','Tu peux modifier cette page. Merci de prévisualiser avant de publier');
ta['ca-addsection'] = new Array('+','Ajoute un commentaire à cette discussion');
ta['ca-viewsource'] = new Array('e','Cette page est protégée. Tu peux voir son code source.');
ta['ca-history'] = new Array('h','Version précédentes de cette page');
ta['ca-protect'] = new Array('=','Protège cette page');
ta['ca-delete'] = new Array('d','Supprime cette page');
ta['ca-undelete'] = new Array('d','Restaure les modifications faites à cette page avant sa suppression');
ta['ca-move'] = new Array('m','Déplace cette page');
ta['ca-watch'] = new Array('w','Ajoute cette page à la liste des pages que tu surveilles');
ta['ca-unwatch'] = new Array('w','Retire cette page de la liste des articles que tu surveilles');
ta['search'] = new Array('f','Cherche un article dans Wikimini');
ta['p-logo'] = new Array('','Page principale');
ta['n-mainpage'] = new Array('z','Retourne à la page principale');
ta['n-portal'] = new Array('','À propos du projet, ce que tu peux faire, où trouver des renseignements');
ta['n-currentevents'] = new Array('','Trouve des informations sur les événements récents');
ta['n-recentchanges'] = new Array('r','La liste des dernières modifications effectuées sur Wikimini.');
ta['n-randompage'] = new Array('x','Visite une page de Wikimini au hasard');
ta['n-help'] = new Array('','Aide');
ta['n-sitesupport'] = new Array('','Aidez-nous');
ta['t-whatlinkshere'] = new Array('j','Liste des pages qui ont un lien pointant vers celle-ci');
ta['t-recentchangeslinked'] = new Array('k','Liste des modifications récentes sur les pages liées à celle-ci');
ta['feed-rss'] = new Array('','Flux RSS de cette page');
ta['feed-atom'] = new Array('','Flux Atom de cette page');
ta['t-contributions'] = new Array('','Regarde la liste des contributions de ce Wikiminaute');
ta['t-emailuser'] = new Array('','Envoie un courriel (e-mail) à ce Wikiminaute');
ta['t-upload'] = new Array('u','Ajoute une image dans le stock de Wikimini');
ta['t-specialpages'] = new Array('q','Liste des pages spéciales de Wikimini');
ta['ca-nstab-main'] = new Array('c','Affiche le contenu de cette page');
ta['ca-nstab-user'] = new Array('c','Affiche la page personnelle de ce Wikiminaute');
ta['ca-nstab-media'] = new Array('c','Affiche la page média');
ta['ca-nstab-special'] = new Array('','Tu es sur une page spéciale. Tu ne peux pas la modifier.');
ta['ca-nstab-wp'] = new Array('a','Affiche la page du projet');
ta['ca-nstab-image'] = new Array('c','Affiche la page de l’image');
ta['ca-nstab-mediawiki'] = new Array('c','Affiche le message système');
ta['ca-nstab-template'] = new Array('c','Affiche le modèle');
ta['ca-nstab-help'] = new Array('c','Affiche la page d’aide');
ta['ca-nstab-category'] = new Array('c','Affiche la page de catégorie');

// ============================================================
// BEGIN Enable multiple onload functions

// setup onload functions this way:
// aOnloadFunctions[aOnloadFunctions.length] = function_name; // without brackets!

if (!window.aOnloadFunctions) {
  var aOnloadFunctions = new Array();
}

window.onload = function() {
  if (window.aOnloadFunctions) {
    for (var _i=0; _i<aOnloadFunctions.length; _i++) {
      aOnloadFunctions[_i]();
    }
  }
}

// END Enable multiple onload functions
// ============================================================

// ============================================================

// =============================================== BOT : recherche de page sans images
if(mw.config.get('wgUserGroups')!=null){
       if(mw.config.get('wgUserGroups').indexOf('sysop')!=-1){    
                if(mw.config.get('wgPageName')=="Wikimini:Pages_à_illustrer"){           
                        //importScript('MediaWiki:Bot/PagesSansImage.js');
mw.loader.load( '/w/index.php?title=MediaWiki:Bot/PagesSansImage.js&action=raw&ctype=text/javascript' );

                }
        }
}
// ===============================================

// ============================================================================
///////////////////////////////// Évite le double-post dans les pages de discussion LQT
//addOnloadHook( function(){
jQuery( function( ) {
    var wpSave = document.getElementById('wpSave');
    var wpForm = document.getElementById('editform');
    if((wpSave)&&(wpForm)){
        wpSave.onclick = function(){
            document.getElementById('editform').submit();
            document.getElementById('wpSave').disabled = "disabled";            
        }
    }
});///////////////////////////////
// ===========================================================================

///////////////////////////////// Fonctions Javascript liées à des modèles
//importScript('MediaWiki:Modeles.js');
mw.loader.load( '/w/index.php?title=MediaWiki:Modeles.js&action=raw&ctype=text/javascript' );
// ===========================================================================

///////////////////////////////// Feuille de style Wikimini
//importStylesheet('MediaWiki:Wikimini.css');
mw.loader.load( '/w/index.php?title=MediaWiki:Wikimini.css&action=raw&ctype=text/css', 'text/css' );
// ===========================================================================

///////////////////////////////// Patch forum, en attendant solution PHP 

//addOnloadHook(AWCForum_Patch);
jQuery( function( ) {
  AWCForum_Patch();
});

function AWCForum_Patch(){
    var AllDivs = document.getElementsByTagName('div');
    var Count = 0
    for(var a=0;a<AllDivs.length;a++){
        var ID = AllDivs[a].id;
        if(ID){
            if(ID == "cat_list_lastaction_title"){
                Count++
                var Link = AllDivs[a].getElementsByTagName('a')[0];
                var Target = DecodeHTMLEntities(decodeURIComponent(Link.href));
                Link.href = Target;
                var Text = Target.replace(/.*id[^\/]+\//, "").replace(/\.html/, "");
                Link.title = Text;
                var CuttedText = Text.substring(0, 20);
                if(Text!=CuttedText) CuttedText += "...";
                Link.innerHTML = CuttedText;
            }
        }
    }
    //alert(Count);
}

function DecodeHTMLEntities(text){
    var EncodedCharacter = new Array();
    var DecodedCharacter = new Array();
    var CharacterCount = 0;
 
    EncodedCharacter[CharacterCount] = "&amp;";
    DecodedCharacter[CharacterCount] = "&";
    CharacterCount++;
    EncodedCharacter[CharacterCount] = "&#039;";
    DecodedCharacter[CharacterCount] = "'";
    CharacterCount++;
    EncodedCharacter[CharacterCount] = "&quot;";
    DecodedCharacter[CharacterCount] = '"';
    CharacterCount++;
    EncodedCharacter[CharacterCount] = "&laquo;";
    DecodedCharacter[CharacterCount] = '«';
    CharacterCount++;
    EncodedCharacter[CharacterCount] = "&raquo;";
    DecodedCharacter[CharacterCount] = '»';
    CharacterCount++;
    EncodedCharacter[CharacterCount] = "&rsquo;";
    DecodedCharacter[CharacterCount] = '’';
    CharacterCount++;
    EncodedCharacter[CharacterCount] = "&hellip;";
    DecodedCharacter[CharacterCount] = '…';
    CharacterCount++;
    EncodedCharacter[CharacterCount] = "&mdash;";
    DecodedCharacter[CharacterCount] = '—';
    CharacterCount++;
    EncodedCharacter[CharacterCount] = "&ndash;";
    DecodedCharacter[CharacterCount] = '–';
    CharacterCount++;
    EncodedCharacter[CharacterCount] = "&bull;";
    DecodedCharacter[CharacterCount] = '•';
    CharacterCount++;
    EncodedCharacter[CharacterCount] = "&nbsp;";
    DecodedCharacter[CharacterCount] = ' ';
    CharacterCount++;

    EncodedCharacter[CharacterCount] = "&Agrave;";
    DecodedCharacter[CharacterCount] = 'À';
    CharacterCount++;
    EncodedCharacter[CharacterCount] = "&Aacute;";
    DecodedCharacter[CharacterCount] = 'Á';
    CharacterCount++;
    EncodedCharacter[CharacterCount] = "&Acirc;";
    DecodedCharacter[CharacterCount] = 'Â';
    CharacterCount++;
    EncodedCharacter[CharacterCount] = "&Atilde;";
    DecodedCharacter[CharacterCount] = 'Ã';
    CharacterCount++;
    EncodedCharacter[CharacterCount] = "&Auml;";
    DecodedCharacter[CharacterCount] = 'Ä';
    CharacterCount++;
    EncodedCharacter[CharacterCount] = "&Aring;";
    DecodedCharacter[CharacterCount] = 'Å';
    CharacterCount++;
    EncodedCharacter[CharacterCount] = "&AElig;";
    DecodedCharacter[CharacterCount] = 'Æ';
    CharacterCount++;
    EncodedCharacter[CharacterCount] = "&Ccedil;";
    DecodedCharacter[CharacterCount] = 'Ç';
    CharacterCount++;
    EncodedCharacter[CharacterCount] = "&Egrave;";
    DecodedCharacter[CharacterCount] = 'È';
    CharacterCount++;
    EncodedCharacter[CharacterCount] = "&Eacute;";
    DecodedCharacter[CharacterCount] = 'É';
    CharacterCount++;
    EncodedCharacter[CharacterCount] = "&Ecirc;";
    DecodedCharacter[CharacterCount] = 'Ê';
    CharacterCount++;
    EncodedCharacter[CharacterCount] = "&Euml;";
    DecodedCharacter[CharacterCount] = 'Ë';
    CharacterCount++;
    EncodedCharacter[CharacterCount] = "&Igrave;";
    DecodedCharacter[CharacterCount] = 'Ì';
    CharacterCount++;
    EncodedCharacter[CharacterCount] = "&Iacute;";
    DecodedCharacter[CharacterCount] = 'Í';
    CharacterCount++;
    EncodedCharacter[CharacterCount] = "&Icirc;";
    DecodedCharacter[CharacterCount] = 'Î';
    CharacterCount++;
    EncodedCharacter[CharacterCount] = "&Iuml;";
    DecodedCharacter[CharacterCount] = 'Ï';
    CharacterCount++;
    EncodedCharacter[CharacterCount] = "&Ntilde;";
    DecodedCharacter[CharacterCount] = 'Ñ';
    CharacterCount++;
    EncodedCharacter[CharacterCount] = "&Ograve;";
    DecodedCharacter[CharacterCount] = 'Ò';
    CharacterCount++;
    EncodedCharacter[CharacterCount] = "&Oacute;";
    DecodedCharacter[CharacterCount] = 'Ó';
    CharacterCount++;
    EncodedCharacter[CharacterCount] = "&Ocirc;";
    DecodedCharacter[CharacterCount] = 'Ô';
    CharacterCount++;
    EncodedCharacter[CharacterCount] = "&Otilde;";
    DecodedCharacter[CharacterCount] = 'Õ';
    CharacterCount++;
    EncodedCharacter[CharacterCount] = "&OElig;";
    DecodedCharacter[CharacterCount] = 'Œ';
    CharacterCount++;
    EncodedCharacter[CharacterCount] = "&Ouml;";
    DecodedCharacter[CharacterCount] = 'Ö';
    CharacterCount++;
    EncodedCharacter[CharacterCount] = "&Oslash;";
    DecodedCharacter[CharacterCount] = 'Ø';
    CharacterCount++;
    EncodedCharacter[CharacterCount] = "&Ugrave;";
    DecodedCharacter[CharacterCount] = 'Ù';
    CharacterCount++;
    EncodedCharacter[CharacterCount] = "&Uacute;";
    DecodedCharacter[CharacterCount] = 'Ú';
    CharacterCount++;
    EncodedCharacter[CharacterCount] = "&Ucirc;";
    DecodedCharacter[CharacterCount] = 'Û';
    CharacterCount++;
    EncodedCharacter[CharacterCount] = "&Uuml;";
    DecodedCharacter[CharacterCount] = 'Ü';
    CharacterCount++;
    EncodedCharacter[CharacterCount] = "&szlig;";
    DecodedCharacter[CharacterCount] = 'ß';
    CharacterCount++;
    EncodedCharacter[CharacterCount] = "&agrave;";
    DecodedCharacter[CharacterCount] = 'à';
    CharacterCount++;
    EncodedCharacter[CharacterCount] = "&aacute;";
    DecodedCharacter[CharacterCount] = 'á';
    CharacterCount++;
    EncodedCharacter[CharacterCount] = "&acirc;";
    DecodedCharacter[CharacterCount] = 'â';
    CharacterCount++;
    EncodedCharacter[CharacterCount] = "&atilde;";
    DecodedCharacter[CharacterCount] = 'ã';
    CharacterCount++;
    EncodedCharacter[CharacterCount] = "&auml;";
    DecodedCharacter[CharacterCount] = 'ä';
    CharacterCount++;
    EncodedCharacter[CharacterCount] = "&aring;";
    DecodedCharacter[CharacterCount] = 'å';
    CharacterCount++;
    EncodedCharacter[CharacterCount] = "&aelig;";
    DecodedCharacter[CharacterCount] = 'æ';
    CharacterCount++;
    EncodedCharacter[CharacterCount] = "&ccedil;";
    DecodedCharacter[CharacterCount] = 'ç';
    CharacterCount++;
    EncodedCharacter[CharacterCount] = "&egrave;";
    DecodedCharacter[CharacterCount] = 'è';
    CharacterCount++;
    EncodedCharacter[CharacterCount] = "&eacute;";
    DecodedCharacter[CharacterCount] = "é";
    CharacterCount++;
    EncodedCharacter[CharacterCount] = "&ecirc;";
    DecodedCharacter[CharacterCount] = 'ê';
    CharacterCount++;
    EncodedCharacter[CharacterCount] = "&euml;";
    DecodedCharacter[CharacterCount] = 'ë';
    CharacterCount++;
    EncodedCharacter[CharacterCount] = "&igrave;";
    DecodedCharacter[CharacterCount] = 'ì';
    CharacterCount++;
    EncodedCharacter[CharacterCount] = "&iacute;";
    DecodedCharacter[CharacterCount] = 'í';
    CharacterCount++;
    EncodedCharacter[CharacterCount] = "&icirc;";
    DecodedCharacter[CharacterCount] = 'î';
    CharacterCount++;
    EncodedCharacter[CharacterCount] = "&iuml;";
    DecodedCharacter[CharacterCount] = 'ï';
    CharacterCount++;
    EncodedCharacter[CharacterCount] = "&ntilde;";
    DecodedCharacter[CharacterCount] = 'ñ';
    CharacterCount++;
    EncodedCharacter[CharacterCount] = "&ograve;";
    DecodedCharacter[CharacterCount] = 'ò';
    CharacterCount++;
    EncodedCharacter[CharacterCount] = "&oacute;";
    DecodedCharacter[CharacterCount] = 'ó';
    CharacterCount++;
    EncodedCharacter[CharacterCount] = "&ocirc;";
    DecodedCharacter[CharacterCount] = 'ô';
    CharacterCount++;
    EncodedCharacter[CharacterCount] = "&otilde;";
    DecodedCharacter[CharacterCount] = 'õ';
    CharacterCount++;
    EncodedCharacter[CharacterCount] = "&oelig;";
    DecodedCharacter[CharacterCount] = 'œ';
    CharacterCount++;
    EncodedCharacter[CharacterCount] = "&ouml;";
    DecodedCharacter[CharacterCount] = 'ö';
    CharacterCount++;
    EncodedCharacter[CharacterCount] = "&oslash;";
    DecodedCharacter[CharacterCount] = 'ø';
    CharacterCount++;
    EncodedCharacter[CharacterCount] = "&ugrave;";
    DecodedCharacter[CharacterCount] = 'ù';
    CharacterCount++;
    EncodedCharacter[CharacterCount] = "&uacute;";
    DecodedCharacter[CharacterCount] = 'ú';
    CharacterCount++;
    EncodedCharacter[CharacterCount] = "&ucirc;";
    DecodedCharacter[CharacterCount] = 'û';
    CharacterCount++;
    EncodedCharacter[CharacterCount] = "&uuml;";
    DecodedCharacter[CharacterCount] = 'ü';
    CharacterCount++;
    EncodedCharacter[CharacterCount] = "&yuml;";
    DecodedCharacter[CharacterCount] = 'ÿ';
    CharacterCount++;
 
    for(var a=0;a<EncodedCharacter.length;a++){
        while(text.indexOf(EncodedCharacter[a])!=-1){
            text = text.split(EncodedCharacter[a]).join(DecodedCharacter[a]);
            if(text.indexOf(EncodedCharacter[a])==-1) break;
        }
    }
    return text;
}
// ===========================================================================


///////////////////////////////// Affichage alerte pour vrais liens externes

//addOnloadHook(function(){
jQuery( function( ) {
   var Links = document.getElementsByTagName("a"); 
   for(var a=0,l=Links.length;a<l;a++){
      if(checkLink(Links[a])){
         Links[a].onclick = function(){
            var Confirm = confirm("Attention : Tu vas quitter le site Wikimini FR. Es-tu sûr(e) de vouloir continuer ?");
            return Confirm;
         }
      }
   }


   function checkLink(obj){
      var href = obj.href.toLowerCase();
      var hostname = "wikimini.";
      return ((href.indexOf("http://")!=-1 && href.indexOf(hostname)==-1) ? true : false);              
   }
});
Wikiboo Outils personnels