« Utilisateur:Charles-Éric Noël Laflamme/brouillon » : différence entre les versions

De Wikimedica
(Test)
 
(essaie ajout js?)
Ligne 6 : Ligne 6 :
| explication = WOW
| explication = WOW
| uuid = b44d1da1-c8d1-40af-b4de-ac49803fc1c1
| uuid = b44d1da1-c8d1-40af-b4de-ac49803fc1c1
}}
}}lll
 
<syntaxhighlight lang="javascript">
/*
* basic-navigation tour
*/
( function ( gt ) {
var tour, launchTourButtons;
 
// Should match shouldShowForPage from firstedit.js
function shouldShowFirstEdit() {
return ( mw.config.get( 'wgCanonicalNamespace' ) === '' && mw.config.get( 'wgIsProbablyEditable' ) );
}
 
tour = new gt.TourBuilder( {
/*
* This is the name of the tour.  It must be lowercase, without any hyphen (-) or
* period (.) characters.
*
* If this is an on-wiki tour, it should match the MediaWiki page.  For instance,
* if this were on-wiki, it would be MediaWiki:Guidedtour-tour-test.js
*/
name: 'basic_navigation'
} );
 
tour.firstStep( {
name: 'overlay',
title: 'Un petit tour de l\'interface de Wikimedica?',
description: 'Quelques notions de base sur l\'interface de Wikimedica vous aideront grandement à tirer plein potentiel de la plateforme',
overlay: true
} )
.next( 'help' );
 
tour.step( {
name: 'help',
title: 'Portail d\'aide',
description: 'En tout temps des pages d\'aide sont disponibles ici.',
attachTo: '#n-help',
position: 'right'
} )
.next( 'recentmodifs' )
.back( 'overlay' );
 
tour.step( {
name: 'recentmodifs',
title: 'Modifications récentes',
description: 'Wikimedica est amélioré plusieurs fois par jour, toutes les modifications récentes sont listées dans cette page.',
attachTo: '#n-Toutes',
position: 'right',
} )
.next( 'end' )
.back( 'help' );
tour.step( {
name: 'end',
title: 'Merci!',
description: new gt.WikitextDescription('Si vous voulez en apprendre plus sur les fonctions de Wikimedica avec d\'autres tours, rendez-vous à [[Aide:Accueil]].'),
overlay:true,
buttons: [
{ action: 'wikiLink', page: 'Aide:Accueil', name: 'Me montrer d\'autres tours', onclick: function(){ gt.endTour(); } },
{ action: 'end'}
]
} )
.back('recentmodifs');
}( mw.guidedTour ) );
</syntaxhighlight>

Version du 15 février 2020 à 17:04

Ma page test

[ modifier ]
Vrai ou faux? Vrai ou faux, ce test fonctionne

  1. Vrai
  2. Faux

a

Vrai
WOW

lll

/*
 * basic-navigation tour
 */
( function ( gt ) {
	var tour, launchTourButtons;

	// Should match shouldShowForPage from firstedit.js
	function shouldShowFirstEdit() {
		return ( mw.config.get( 'wgCanonicalNamespace' ) === '' && mw.config.get( 'wgIsProbablyEditable' ) );
	}

	tour = new gt.TourBuilder( {
		/*
		 * This is the name of the tour.  It must be lowercase, without any hyphen (-) or
		 * period (.) characters.
		 *
		 * If this is an on-wiki tour, it should match the MediaWiki page.  For instance,
		 * if this were on-wiki, it would be MediaWiki:Guidedtour-tour-test.js
		 */
		name: 'basic_navigation'
	} );

	tour.firstStep( {
		name: 'overlay',
		title: 'Un petit tour de l\'interface de Wikimedica?',
		description: 'Quelques notions de base sur l\'interface de Wikimedica vous aideront grandement à tirer plein potentiel de la plateforme',
		overlay: true
	} )
		.next( 'help' );

	tour.step( {
		name: 'help',
		title: 'Portail d\'aide',
		description: 'En tout temps des pages d\'aide sont disponibles ici.',
		attachTo: '#n-help',
		position: 'right'
	} )
		.next( 'recentmodifs' )
		.back( 'overlay' );

	tour.step( {
		name: 'recentmodifs',
		title: 'Modifications récentes',
		description: 'Wikimedica est amélioré plusieurs fois par jour, toutes les modifications récentes sont listées dans cette page.',
		attachTo: '#n-Toutes',
		position: 'right',
	} )
		.next( 'end' )
		.back( 'help' );
		
	tour.step( {
		name: 'end',
		title: 'Merci!',
		description: new gt.WikitextDescription('Si vous voulez en apprendre plus sur les fonctions de Wikimedica avec d\'autres tours, rendez-vous à [[Aide:Accueil]].'),
		overlay:true,
		buttons: [ 
			{ action: 'wikiLink', page: 'Aide:Accueil', name: 'Me montrer d\'autres tours', onclick: function(){ gt.endTour(); } },
			{ action: 'end'}	
		]
	} )
		.back('recentmodifs');
	
}( mw.guidedTour ) );