« Utilisateur:Bastenbas/timeless.js » : différence entre les versions

De Anekdotos
Aucun résumé des modifications
Aucun résumé des modifications
 
Ligne 7 : Ligne 7 :
  * @revision 2014-05-14
  * @revision 2014-05-14
  */
  */
$( function () {
 
    if ( !$( '#ca-purge' ).length && mw.config.get( 'wgIsArticle' ) ) {
mw.util.$content.append( '<h2>Lorem ipsum</h2><p>This section was just added to the bottom of the wiki page.</p>' );
        mw.util.addPortletLink(
            'p-cactions',
            mw.util.wikiScript() + '?' + $.param({ title: mw.config.get( 'wgPageName' ), action: 'purge' }),
            mw.config.get( 'skin' ) === 'vector' ? 'Purge' : '*',
            'ca-purge',
            'Purge the server cache of this page',
            '*'
        );
    }
} );

Dernière version du 12 juillet 2021 à 11:59

/**
 * Add "Purge" content action link.
 *
 * Dependencies: mediawiki.util
 *
 * @source www.mediawiki.org/wiki/Snippets/Purge_action
 * @revision 2014-05-14
 */

mw.util.$content.append( '<h2>Lorem ipsum</h2><p>This section was just added to the bottom of the wiki page.</p>' );