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

De Anekdotos
Aucun résumé des modifications
Aucun résumé des modifications
Ligne 1 : Ligne 1 :
# mw.util.addPortletLink("p-cactions","https://anekdotos.net/wiki/Anekdotos"+mw.config.get( 'wgCurrentDay' ),"Anekdote du jour");
mw.util.addPortletLink("p-cactions","https://anekdotos.net/wiki/Anekdotos"+mw.config.get( 'wgCurrentDay' ),"Anekdote du jour");


util.addPortletLink(
mw.util.$content.append( '<h2>Lorem ipsum</h2><p>This section was just added to the bottom of the wiki page.</p>' );
    'p-tb', 'https://www.mediawiki.org/',
    'mediawiki.org', 't-mworg', 'Go to mediawiki.org', 'm', '#t-print'
);
 
var node = util.addPortletLink(
    'p-tb',
    new mw.Title( 'Special:Example' ).getUrl(),
    'Example'
);
$( node ).on( 'click', function ( e ) {
    console.log( 'Example' );
    e.preventDefault();
} );

Version du 12 juillet 2021 à 12:01

mw.util.addPortletLink("p-cactions","https://anekdotos.net/wiki/Anekdotos"+mw.config.get( 'wgCurrentDay' ),"Anekdote du jour");

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