« MediaWiki:Wikimini.js » : différence entre les versions
Jump to navigation
Jump to search
Aucun résumé des modifications |
Aucun résumé des modifications |
||
| (20 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>\« ' + wgTitle + ' \»</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(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' ); |
|||
// =========================================================================== |
// =========================================================================== |
||
| Ligne 327 : | Ligne 114 : | ||
//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 = |
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] = "&";
DecodedCharacter[CharacterCount] = "&";
CharacterCount++;
EncodedCharacter[CharacterCount] = "'";
DecodedCharacter[CharacterCount] = "'";
CharacterCount++;
EncodedCharacter[CharacterCount] = """;
DecodedCharacter[CharacterCount] = '"';
CharacterCount++;
EncodedCharacter[CharacterCount] = "«";
DecodedCharacter[CharacterCount] = '«';
CharacterCount++;
EncodedCharacter[CharacterCount] = "»";
DecodedCharacter[CharacterCount] = '»';
CharacterCount++;
EncodedCharacter[CharacterCount] = "’";
DecodedCharacter[CharacterCount] = '’';
CharacterCount++;
EncodedCharacter[CharacterCount] = "…";
DecodedCharacter[CharacterCount] = '…';
CharacterCount++;
EncodedCharacter[CharacterCount] = "—";
DecodedCharacter[CharacterCount] = '—';
CharacterCount++;
EncodedCharacter[CharacterCount] = "–";
DecodedCharacter[CharacterCount] = '–';
CharacterCount++;
EncodedCharacter[CharacterCount] = "•";
DecodedCharacter[CharacterCount] = '•';
CharacterCount++;
EncodedCharacter[CharacterCount] = " ";
DecodedCharacter[CharacterCount] = ' ';
CharacterCount++;
EncodedCharacter[CharacterCount] = "À";
DecodedCharacter[CharacterCount] = 'À';
CharacterCount++;
EncodedCharacter[CharacterCount] = "Á";
DecodedCharacter[CharacterCount] = 'Á';
CharacterCount++;
EncodedCharacter[CharacterCount] = "Â";
DecodedCharacter[CharacterCount] = 'Â';
CharacterCount++;
EncodedCharacter[CharacterCount] = "Ã";
DecodedCharacter[CharacterCount] = 'Ã';
CharacterCount++;
EncodedCharacter[CharacterCount] = "Ä";
DecodedCharacter[CharacterCount] = 'Ä';
CharacterCount++;
EncodedCharacter[CharacterCount] = "Å";
DecodedCharacter[CharacterCount] = 'Å';
CharacterCount++;
EncodedCharacter[CharacterCount] = "Æ";
DecodedCharacter[CharacterCount] = 'Æ';
CharacterCount++;
EncodedCharacter[CharacterCount] = "Ç";
DecodedCharacter[CharacterCount] = 'Ç';
CharacterCount++;
EncodedCharacter[CharacterCount] = "È";
DecodedCharacter[CharacterCount] = 'È';
CharacterCount++;
EncodedCharacter[CharacterCount] = "É";
DecodedCharacter[CharacterCount] = 'É';
CharacterCount++;
EncodedCharacter[CharacterCount] = "Ê";
DecodedCharacter[CharacterCount] = 'Ê';
CharacterCount++;
EncodedCharacter[CharacterCount] = "Ë";
DecodedCharacter[CharacterCount] = 'Ë';
CharacterCount++;
EncodedCharacter[CharacterCount] = "Ì";
DecodedCharacter[CharacterCount] = 'Ì';
CharacterCount++;
EncodedCharacter[CharacterCount] = "Í";
DecodedCharacter[CharacterCount] = 'Í';
CharacterCount++;
EncodedCharacter[CharacterCount] = "Î";
DecodedCharacter[CharacterCount] = 'Î';
CharacterCount++;
EncodedCharacter[CharacterCount] = "Ï";
DecodedCharacter[CharacterCount] = 'Ï';
CharacterCount++;
EncodedCharacter[CharacterCount] = "Ñ";
DecodedCharacter[CharacterCount] = 'Ñ';
CharacterCount++;
EncodedCharacter[CharacterCount] = "Ò";
DecodedCharacter[CharacterCount] = 'Ò';
CharacterCount++;
EncodedCharacter[CharacterCount] = "Ó";
DecodedCharacter[CharacterCount] = 'Ó';
CharacterCount++;
EncodedCharacter[CharacterCount] = "Ô";
DecodedCharacter[CharacterCount] = 'Ô';
CharacterCount++;
EncodedCharacter[CharacterCount] = "Õ";
DecodedCharacter[CharacterCount] = 'Õ';
CharacterCount++;
EncodedCharacter[CharacterCount] = "Œ";
DecodedCharacter[CharacterCount] = 'Œ';
CharacterCount++;
EncodedCharacter[CharacterCount] = "Ö";
DecodedCharacter[CharacterCount] = 'Ö';
CharacterCount++;
EncodedCharacter[CharacterCount] = "Ø";
DecodedCharacter[CharacterCount] = 'Ø';
CharacterCount++;
EncodedCharacter[CharacterCount] = "Ù";
DecodedCharacter[CharacterCount] = 'Ù';
CharacterCount++;
EncodedCharacter[CharacterCount] = "Ú";
DecodedCharacter[CharacterCount] = 'Ú';
CharacterCount++;
EncodedCharacter[CharacterCount] = "Û";
DecodedCharacter[CharacterCount] = 'Û';
CharacterCount++;
EncodedCharacter[CharacterCount] = "Ü";
DecodedCharacter[CharacterCount] = 'Ü';
CharacterCount++;
EncodedCharacter[CharacterCount] = "ß";
DecodedCharacter[CharacterCount] = 'ß';
CharacterCount++;
EncodedCharacter[CharacterCount] = "à";
DecodedCharacter[CharacterCount] = 'à';
CharacterCount++;
EncodedCharacter[CharacterCount] = "á";
DecodedCharacter[CharacterCount] = 'á';
CharacterCount++;
EncodedCharacter[CharacterCount] = "â";
DecodedCharacter[CharacterCount] = 'â';
CharacterCount++;
EncodedCharacter[CharacterCount] = "ã";
DecodedCharacter[CharacterCount] = 'ã';
CharacterCount++;
EncodedCharacter[CharacterCount] = "ä";
DecodedCharacter[CharacterCount] = 'ä';
CharacterCount++;
EncodedCharacter[CharacterCount] = "å";
DecodedCharacter[CharacterCount] = 'å';
CharacterCount++;
EncodedCharacter[CharacterCount] = "æ";
DecodedCharacter[CharacterCount] = 'æ';
CharacterCount++;
EncodedCharacter[CharacterCount] = "ç";
DecodedCharacter[CharacterCount] = 'ç';
CharacterCount++;
EncodedCharacter[CharacterCount] = "è";
DecodedCharacter[CharacterCount] = 'è';
CharacterCount++;
EncodedCharacter[CharacterCount] = "é";
DecodedCharacter[CharacterCount] = "é";
CharacterCount++;
EncodedCharacter[CharacterCount] = "ê";
DecodedCharacter[CharacterCount] = 'ê';
CharacterCount++;
EncodedCharacter[CharacterCount] = "ë";
DecodedCharacter[CharacterCount] = 'ë';
CharacterCount++;
EncodedCharacter[CharacterCount] = "ì";
DecodedCharacter[CharacterCount] = 'ì';
CharacterCount++;
EncodedCharacter[CharacterCount] = "í";
DecodedCharacter[CharacterCount] = 'í';
CharacterCount++;
EncodedCharacter[CharacterCount] = "î";
DecodedCharacter[CharacterCount] = 'î';
CharacterCount++;
EncodedCharacter[CharacterCount] = "ï";
DecodedCharacter[CharacterCount] = 'ï';
CharacterCount++;
EncodedCharacter[CharacterCount] = "ñ";
DecodedCharacter[CharacterCount] = 'ñ';
CharacterCount++;
EncodedCharacter[CharacterCount] = "ò";
DecodedCharacter[CharacterCount] = 'ò';
CharacterCount++;
EncodedCharacter[CharacterCount] = "ó";
DecodedCharacter[CharacterCount] = 'ó';
CharacterCount++;
EncodedCharacter[CharacterCount] = "ô";
DecodedCharacter[CharacterCount] = 'ô';
CharacterCount++;
EncodedCharacter[CharacterCount] = "õ";
DecodedCharacter[CharacterCount] = 'õ';
CharacterCount++;
EncodedCharacter[CharacterCount] = "œ";
DecodedCharacter[CharacterCount] = 'œ';
CharacterCount++;
EncodedCharacter[CharacterCount] = "ö";
DecodedCharacter[CharacterCount] = 'ö';
CharacterCount++;
EncodedCharacter[CharacterCount] = "ø";
DecodedCharacter[CharacterCount] = 'ø';
CharacterCount++;
EncodedCharacter[CharacterCount] = "ù";
DecodedCharacter[CharacterCount] = 'ù';
CharacterCount++;
EncodedCharacter[CharacterCount] = "ú";
DecodedCharacter[CharacterCount] = 'ú';
CharacterCount++;
EncodedCharacter[CharacterCount] = "û";
DecodedCharacter[CharacterCount] = 'û';
CharacterCount++;
EncodedCharacter[CharacterCount] = "ü";
DecodedCharacter[CharacterCount] = 'ü';
CharacterCount++;
EncodedCharacter[CharacterCount] = "ÿ";
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);
}
});
Ce que tu peux faire
Outils

Outils personnels