MediaWiki:Gadget-LiveRC.js/Extensions/RunCommonJS.js

Une page de Wikipédia, l'encyclopédie libre.
Note : après avoir enregistré la page, vous devrez forcer le rechargement complet du cache de votre navigateur pour voir les changements.

Mozilla / Firefox / Konqueror / Safari : maintenez la touche Majuscule (Shift) en cliquant sur le bouton Actualiser (Reload) ou pressez Maj-Ctrl-R (Cmd-R sur Apple Mac) ;

Chrome / Internet Explorer / Opera : maintenez la touche Ctrl en cliquant sur le bouton Actualiser ou pressez Ctrl-F5.
/*
 --------------------------------------------------------------------------------------
 ---------LLLL---------III--------------------------RRRRRRRRRR--------CCCCC------------
 ---------LLLL---------III--------------------------RRRRRRRRRRRR----CCCCCCCCC----------
 ---------LLLL--------------------------------------RRR------RRR---CCC-----CCC---------
 ---------LLLL---------III--VV-----VV--EEEEEEEEE----RRR------RRR--CCC------------------
 ---------LLLL---------III---VV---VV---EEE----------RRRRRRRRRRR---CCC------------------
 ---------LLLL---------III---VV---VV---EEEEEE-------RRRRRRRRRR----CCC------------------
 ---------LLLL---------III----VV-VV----EEEEEE-------RRR-----RRR----CCC-----CCC---------
 ---------LLLLLLLLLLL--III----VVVVV----EEE----------RRR------RRR----CCCCCCCCC----------
 ---------LLLLLLLLLLL--III-----VVV-----EEEEEEEEE----RRR-------RRR-----CCCCC------------
 --------------------------------------------------------------------------------------

'''Extension de LiveRC'''

Permet d'améliorer la prévisualisation avec les fonctions du Common.js :
* Modèle {{Animation}},
* Géolocalisation multiple,
* Boîtes déroulantes,
* Palettes de navigation.

* Licence : ...?
* Documentation :
* Auteur : [[:fr:User:Dr Brains]]
* Développement et maintenance :


{{Catégorisation JS|LiveRC}}

<source lang=javascript> */
if (typeof LiveRC_AddHook === 'function') {
    LiveRC_Config['InstalledLiveRCExtensions'].push('RunCommonJS');
    /* ************************************************************************************************************** */

    window.RunCommonJS = function () {
        if (mw.config.get('wgPageName') !== lrcMakeParam('PageTitle')) return;
        var $preview = $('#livePreview');
        if (!$preview.length) return;

        // Modèle {{Animation}}
        if ($preview.find('.diaporama').length) {
            mw.loader.using('ext.gadget.Diaporama', function () {
                Diaporama_Init($preview);
            });
        }

        GeoBox_Init($preview);      // Géolocalisation multiple
        BoiteDeroulante($preview);  // Boîtes déroulantes
        Palette($preview);          // Palettes de navigation
    };

    //////////////////// HOOKS

    LiveRC_AddHook('AfterPreviewDiff', RunCommonJS);
    LiveRC_AddHook('AfterPreviewArticle', RunCommonJS);
    LiveRC_AddHook('AfterPreviewHistory', RunCommonJS);
    LiveRC_AddHook('AfterPreviewContribs', RunCommonJS);
    LiveRC_AddHook('AfterPreviewDeletedContribs', RunCommonJS);
    LiveRC_AddHook('AfterPreviewEdit', RunCommonJS);
    LiveRC_AddHook('AfterPreviewLog', RunCommonJS);
    LiveRC_AddHook('AfterPreviewFilter', RunCommonJS);
    LiveRC_AddHook('AfterPreviewMove', RunCommonJS);
    LiveRC_AddHook('AfterPreviewProtect', RunCommonJS);
    LiveRC_AddHook('AfterPreviewDelete', RunCommonJS);
    LiveRC_AddHook('AfterPreviewBlock', RunCommonJS);
    LiveRC_AddHook('AfterPreviewRevisiondelete', RunCommonJS);
    LiveRC_AddHook('AfterPreviewWhatlinkshere', RunCommonJS);
    LiveRC_AddHook('AfterPreviewFeedback', RunCommonJS);

    /* ************************************************************************************************************** */
}
//</source>