See also ebooksgratis.com: no banners, no cookies, totally FREE.

CLASSICISTRANIERI HOME PAGE - YOUTUBE CHANNEL
Privacy Policy Cookie Policy Terms and Conditions
Utilisateur:Guillom/monobook/correcteur.js - Wikipédia

Utilisateur:Guillom/monobook/correcteur.js

Un article de Wikipédia, l'encyclopédie libre.

Note : Après avoir publié la page, vous devrez forcer son rechargement pour voir les changements : Mozilla / Konqueror / Firefox : Shift-Ctrl-R, Internet Explorer / Opera : Ctrl-F5, Safari : Cmd-R.

/* <pre><nowiki> */
 
/* ****************************************** */
/* EDUCA33E : 23/03/06                        */
/* Fonction de remplacement automatisé        */
/* à partir des pages search et Whatlinkshere */
/* et Catégorie (lettre par lettre)           */
/* ATTENTION :                                */
/* Enregistrement automatique du remplacement */
/* ****************************************** */
function ORTHOPatrol()
{
        if ( window.location.href.indexOf('Search') < 0 && window.location.href.indexOf('Special:Whatlinkshere') < 0 && window.location.href.indexOf('Cat%C3%A9gorie:') < 0) return;
 
        var r = prompt("ORTHO : Chaîne à remplacer (expression régulière) ?"); // exemple (A|a)cb(d|e)
        var s = prompt("ORTHO : À remplacer par ?"); // exemple $1bc$2
        // d'où de part l'exemple :
        // Acbd => Abcd
        // acbd => abcd
        // Acbe => Abce
        // acbe => abce
 
        var page_nom = document.getElementById( 'content' ).getElementsByTagName( 'h1' )[ 0 ];
        var page_name = page_nom.firstChild.nodeValue;
 
        var items, item, i, links, user, name, talk, contribs, insertLoc, link;
 
        items = document.getElementById( 'bodyContent' ).getElementsByTagName( 'ul' )[ 0 ].getElementsByTagName( 'li' );
 
        function NewLink( txt, url, plainlinks, linkColor )
        {
                var a = document.createElement( 'a' );
                a.appendChild( document.createTextNode( txt ) );
                a.href = url;
                if ( plainlinks ) a.className = 'plainlinks';
                if ( linkColor )
                {       if ( typeof linkColor == "string" )
                                        a.style.color = linkColor;
                        else    a.style.color = '#FF0000'; // old default behavior
                }
                return a;
        }
 
        for ( i = 0; i < items.length; i++ )
        {
                item = items[ i ];              
                links = item.getElementsByTagName( 'a' );
                user = links[ 0 ]; name = user.firstChild.nodeValue;
                insertLoc = user.nextSibling; // ' newusers '
 
                item.insertBefore( document.createTextNode( ' [' ), insertLoc );
                item.insertBefore( NewLink( 's:/'+r+'/'+s+'/', '/w/index.php?title='+name+'&action=edit&or1='+escape(r)+'&or2='+escape(s), true, 'blue' ), insertLoc );
                item.insertBefore( document.createTextNode( '] ' ), insertLoc );
 
        }
}
if ( window.addEventListener ) window.addEventListener( 'load', ORTHOPatrol, false );
else if ( window.attachEvent ) window.attachEvent( 'onload', ORTHOPatrol );
 
// Récupération des paramètres passés par url.
function TJSExtraireParam() {
        url = window.location.href;
        var exp=new RegExp("[&?]+","g");
        var exp2=new RegExp("[=]+","g");
        var tabNom=url.split(exp);
        var     tabParam=new Array();
        if (tabNom!=null) {
                for (var i=1;i<tabNom.length;i++){
                        var tabTemp=tabNom[i].split(exp2);
                        tabParam[tabTemp[0]]=unescape(tabTemp[1]);
                }
        }
        return tabParam;
}
 
// Remplacement de texte r pour s.
// s = expression régulière.
function replaceortho(s,r){
        var txt = document.editform.wpTextbox1;
        txt.value = txt.value.replace(new RegExp(s, "gi"), r);
}
 
function changeSummary(sampleText) {
        document.editform.wpSummary.value = sampleText;
}
 
// Récupération des paramètres d'URL pour remplacement
function autoSaveOrtho() {
        var toolbar = document.getElementById("toolbar"); 
        if (!toolbar) return;
        if ( window.location.href.indexOf('or1=') >= 0 ) {
                var urlParam = TJSExtraireParam();
                replaceortho(urlParam["or1"],urlParam["or2"]);
                changeSummary('ortho s:/'+urlParam["or1"]+'/'+urlParam["or2"]+'/');
                document.editform.submit();
        }
}
 
addLoadEvent(autoSaveOrtho);
 
/* </nowiki></pre> */


aa - ab - af - ak - als - am - an - ang - ar - arc - as - ast - av - ay - az - ba - bar - bat_smg - bcl - be - be_x_old - bg - bh - bi - bm - bn - bo - bpy - br - bs - bug - bxr - ca - cbk_zam - cdo - ce - ceb - ch - cho - chr - chy - co - cr - crh - cs - csb - cu - cv - cy - da - de - diq - dsb - dv - dz - ee - el - eml - en - eo - es - et - eu - ext - fa - ff - fi - fiu_vro - fj - fo - fr - frp - fur - fy - ga - gan - gd - gl - glk - gn - got - gu - gv - ha - hak - haw - he - hi - hif - ho - hr - hsb - ht - hu - hy - hz - ia - id - ie - ig - ii - ik - ilo - io - is - it - iu - ja - jbo - jv - ka - kaa - kab - kg - ki - kj - kk - kl - km - kn - ko - kr - ks - ksh - ku - kv - kw - ky - la - lad - lb - lbe - lg - li - lij - lmo - ln - lo - lt - lv - map_bms - mdf - mg - mh - mi - mk - ml - mn - mo - mr - mt - mus - my - myv - mzn - na - nah - nap - nds - nds_nl - ne - new - ng - nl - nn - no - nov - nrm - nv - ny - oc - om - or - os - pa - pag - pam - pap - pdc - pi - pih - pl - pms - ps - pt - qu - quality - rm - rmy - rn - ro - roa_rup - roa_tara - ru - rw - sa - sah - sc - scn - sco - sd - se - sg - sh - si - simple - sk - sl - sm - sn - so - sr - srn - ss - st - stq - su - sv - sw - szl - ta - te - tet - tg - th - ti - tk - tl - tlh - tn - to - tpi - tr - ts - tt - tum - tw - ty - udm - ug - uk - ur - uz - ve - vec - vi - vls - vo - wa - war - wo - wuu - xal - xh - yi - yo - za - zea - zh - zh_classical - zh_min_nan - zh_yue - zu -