« MediaWiki:Guidedtour-tour-ask question.js » : différence entre les versions

De Wikimedica
(Modification description)
(Pas besoin de pouvoir éditer une page pour que ce tour soit lancé)
 
Ligne 4 : Ligne 4 :
( function ( gt ) {
( function ( gt ) {
var tour, launchTourButtons;
var tour, launchTourButtons;
if(!mw.config.get('wgIsProbablyEditable'))
{
return; // Skip the tour if the user cannot edit the page.
}
console.log('Loading help link tour.');
console.log('Loading help link tour.');

Dernière version du 17 décembre 2021 à 17:46

/*
 * help tour
 */
( function ( gt ) {
	var tour, launchTourButtons;
	
	console.log('Loading help link tour.');
	
	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: 'ask_question'
	} );

	tour.firstStep( {
		name: 'ask_question',
		title: 'Vous avez une question?',
		description: 'Vous pouvez en tout temps poser une question dans le forum en cliquant sur le bouton <b>Poser une question</b><br><br>Les différents contribueurs de la plateforme seront heureux de répondre à vos interrogations!',
		attachTo: '#n-Poser-une-question',
		position: 'right',
		buttons: [ 
			{ action: 'end', classString: 'mw-tour-complete'}	
		],
		closeOnClickOutside: false
	} );
	
}( mw.guidedTour ) );