_ _    _ _____  ___   __                       
 __      _(_) | _(_)___ / ( _ ) / /_   ___ ___  _ __ ___  
 \ \ /\ / / | |/ / | |_ \ / _ \| '_ \ / __/ _ \| '_ ` _ \ 
  \ V  V /| |   <| |___) | (_) | (_) | (_| (_) | | | | | |
   \_/\_/ |_|_|\_\_|____/ \___/ \___(_)___\___/|_| |_| |_|

MediaWiki:Guidedtour-tour-outreachbebold.js

In this article, we are going to address MediaWiki:Guidedtour-tour-outreachbebold.js, a topic that has gained relevance in recent years. Since its emergence, MediaWiki:Guidedtour-tour-outreachbebold.js has captured the attention of diverse audiences, generating debate and reflection around its implications. Over the years, MediaWiki:Guidedtour-tour-outreachbebold.js has been the subject of research and analysis by experts in the area, who have contributed to expanding our understanding of this phenomenon. On this occasion, we will delve into the analysis of MediaWiki:Guidedtour-tour-outreachbebold.js from different perspectives, exploring its historical, sociocultural, political and economic dimensions. Likewise, we are interested in examining the impact that MediaWiki:Guidedtour-tour-outreachbebold.js has had on contemporary society and how it has shaped our ways of thinking and acting. With this, we seek to offer a comprehensive vision of MediaWiki:Guidedtour-tour-outreachbebold.js that invites reflection and dialogue on this topic that is so relevant today.
// Guided Tour for learning wikicode by making a series of edits in a user sandbox, as an interactive interlude in https://outreachdashboard.wmflabs.org/training/editing-wikipedia/editing-basics
// Forked from MediaWiki:Guidedtour-tour-wikiedbebold.js
( function ( gt ) {

//automatic api:edit function to send yourself messages
mw.loader.using( 'mediawiki.Title', function() {

function sendMessage( targetPage, msgPage, linkTo ) {
	var api = new mw.Api();
	api.get( {
		'action' : 'query',
		'titles' : msgPage,
		'prop'   : 'revisions',
		'meta'   : 'tokens',
		'type'   : 'csrf',
		'rvprop' : 'content',
		'indexpageids' : 1
	} ).done( function (result) {
		result = result.query;
		var page = result.pages];
		var text = page.revisions;
		api.post( {
			'action' : 'edit',
			'title' : targetPage,
			'appendtext' : "\n" + text,
			'summary' : 'automatic post as part of sandbox guided tour',
			'token' : result.tokens.csrftoken
		} ).done( function () {
			window.location.href = linkTo;
		} );
	} );
}

var tour;

tour = new gt.TourBuilder( {
    name: 'outreachbebold'
} );

tour.firstStep( {
	name: 'welcome',
	title: 'Welcome to your sandbox!',
    description: 'Project:Wiki_Ed/tour/be_bold1',
    onShow: gt.getPageAsDescription,
	buttons: [ {
        name: '<small>←</small>',
        action: 'externalLink',
        url: 'https://outreachdashboard.wmflabs.org/training/editing-wikipedia/editing-basics/be-bold-tutorial'        
    }, {
	    name: 'Okay!',
	    onclick: function() {	if(!mw.config.get('wgUserName')){  alert( "Please login." );   return;   }
	    						sendMessage(	'User:' + mw.config.get( 'wgUserName' ) + '/be_bold',
	    										'Project:Training/tour/be_bold_preload',
	    										mw.util.getUrl( 'Special:MyPage/be_bold' ) + '?tour=outreachbebold&step=editButton&vehidebetadialog=1');
							}
    } ],
    overlay: true,
	closeOnClickOutside: false,
    allowAutomaticOkay: false,
    allowAutomaticNext: false
} )
	.next( 'editButton' );

tour.step( {
	name: 'editButton',
	title: 'Edit button',
    description: 'Project:Wiki_Ed/tour/be_bold2',
    attachTo: '#ca-ve-edit',
    position: 'bottom',
    onShow: gt.getPageAsDescription,
    overlay: false,
    closeOnClickOutside: false,
    allowAutomaticOkay: false,
    allowAutomaticNext: false,
} )
	.listenForMwHooks( 've.activationComplete' )
	.transition( function () { if ( gt.isEditing() ) { return 'anyEdit'; } } )
	.next( 'anyEdit' );

tour.step( {
	name: 'anyEdit',
	title: 'Make an edit!',
	description: 'Project:Wiki_Ed/tour/be_bold2-1',
	onShow: gt.getPageAsDescription,
	attachTo: '.ve-ui-toolbar-saveButton', 
	position: 'bottomLeft',
	buttons: [ {
	    name: 'Onward!',
        onclick: function() { mw.libs.guiders.hideAll(); } 
    } ],
	overlay: false,
	closeOnClickOutside: false,
    allowAutomaticOkay: false,
    allowAutomaticNext: false
} )
	.listenForMwHooks( 've.toolbarSaveButton.stateChanged' )
	.transition( function () { if ( gt.isEditing() ) { return 'saveAnyEdit'; } } )
	.next( 'saveAnyEdit' );

tour.step( {
	name: 'saveAnyEdit',
	title: 'Explore a bit, make a change, then save the page.',
	description: 'Project:Wiki_Ed/tour/be_bold2-2',
	onShow: gt.getPageAsDescription,
	attachTo: '.ve-ui-toolbar-saveButton', 
	position: 'bottomLeft',
	overlay: false,
	closeOnClickOutside: false,
    allowAutomaticOkay: false,
    allowAutomaticNext: false
} )
	.listenForMwHooks( 've.deactivationComplete' )
	.transition( function () { if ( gt.isPostEdit() ) { return 'afterFirstEdit'; } } )
	.next( 'afterFirstEdit' );

tour.step( {
	name: 'afterFirstEdit',
	title: 'How was that?',
    description: 'Project:Wiki_Ed/tour/be_bold2-3',
    onShow: gt.getPageAsDescription,
	buttons: [ {
        name: 'Try again.',
        action: 'externalLink',
        url: mw.util.getUrl( 'Special:MyPage/be_bold' ) + '?tour=outreachbebold&step=editButton&vehidebetadialog=1'
    }, {
	    name: 'Move on.',
        action: 'externalLink',
        url: mw.util.getUrl( 'Special:MyPage/be_bold' ) + '?tour=outreachbebold&step=editBoldness&vehidebetadialog=1'
    } ],
    overlay: true,
	closeOnClickOutside: false,
    allowAutomaticOkay: false,
    allowAutomaticNext: false
} )
	.next( 'editBoldness' );

tour.step( {
	name: 'editBoldness',
	title: 'Now try another edit.',
    description: 'Project:Wiki_Ed/tour/be_bold2-4',
    attachTo: '#ca-ve-edit',
    position: 'bottom',
    onShow: gt.getPageAsDescription,
    overlay: false,
    closeOnClickOutside: false,
    allowAutomaticOkay: false,
    allowAutomaticNext: false,
} )
	.listenForMwHooks( 've.activationComplete' )
	.transition( function () { if ( gt.isEditing() ) { return 'boldness'; } } )
	.next( 'boldness' );

tour.step( {
	name: 'boldness',
	title: 'Boldness',
	description: 'Project:Wiki_Ed/tour/be_bold3',
	onShow: gt.getPageAsDescription,
	attachTo: '#content', 
	position: 'bottomLeft',
	buttons: [ {
		name: 'I bolded the text.',
		onclick: function() { mw.libs.guiders.next(); } 
	} ],
	overlay: false,
	closeOnClickOutside: false,
    allowAutomaticOkay: false,
    allowAutomaticNext: false
} )
	.listenForMwHooks( 've.deactivationComplete' )
	.transition( function () { if ( gt.isPostEdit() ) { return 'looksGood'; } } )
	.back( 'editBoldness' )
	.next( 'editSummary' );

tour.step( {
	name: 'editSummary',
	title: 'Edit summary, and Save',
	onShow: gt.getPageAsDescription,
	description: 'Project:Wiki_Ed/tour/be_bold4',
	attachTo: '.ve-ui-toolbar-saveButton',
	position: 'bottomLeft',
	autoFocus: 'yes',
	overlay: false,
	closeOnClickOutside: false,
    allowAutomaticOkay: false,
    allowAutomaticNext: false
} )
	.listenForMwHooks( 've.deactivationComplete' )
	.transition( function () { if ( gt.isPostEdit() ) { return 'looksGood'; } } )
	.next( 'looksGood' );

tour.step( {
	name: 'looksGood',
	title: 'How was that?',
    description: 'Project:Wiki_Ed/tour/be_bold5',
    onShow: gt.getPageAsDescription,
	buttons: [ {
        name: 'Try again.',
        action: 'externalLink',
        url: mw.util.getUrl( 'Special:MyPage/be_bold' ) + '?tour=outreachbebold&step=editButton&vehidebetadialog=1'
    }, {
	    name: 'Move on.',
        onclick: function() { mw.libs.guiders.next(); } 
    } ],
    overlay: true,
	closeOnClickOutside: false,
    allowAutomaticOkay: false,
    allowAutomaticNext: false
} )
	.next( 'editButtonCitation' );

tour.step( {
	name: 'editButtonCitation',
	title: 'Now let\'s add a citation!',
    description: 'Project:Wiki_Ed/tour/be_bold6',
    attachTo: '#ca-ve-edit',
    position: 'bottom',
    onShow: gt.getPageAsDescription,
    overlay: false,
    closeOnClickOutside: false,
    allowAutomaticOkay: false,
    allowAutomaticNext: false,
} )
	.listenForMwHooks( 've.activationComplete' )
	.transition( function () { if ( gt.isEditing() ) { return 'positionCursor'; } } )
	.next( 'positionCursor' );

tour.step( {
	name: 'positionCursor',
	title: 'First, click the end of the sentence',
	description: 'Project:Wiki_Ed/tour/be_bold7',
	onShow: gt.getPageAsDescription,
	attachTo: '#content', 
	position: 'bottomLeft',
	buttons: [ {
		name: 'I positioned the cursor.',
		onclick: function() { mw.libs.guiders.next(); } 
	} ],
	overlay: false,
	closeOnClickOutside: false,
    allowAutomaticOkay: false,
    allowAutomaticNext: false
} )
	.next( 'citeButton' );

tour.step( {
	name: 'citeButton',
	title: 'Now click the "Cite" button',
	description: '',
	attachTo: '.oo-ui-tool-name-citoid',
	position: 'right',
	buttons: [ {
		name: 'I clicked Cite.',
		onclick: function() { mw.libs.guiders.next(); } 
	} ],
	overlay: false,
	closeOnClickOutside: false,
    allowAutomaticOkay: false,
    allowAutomaticNext: false
} )
	.next( 'insertCitation' );

tour.step( {
	name: 'insertCitation',
	title: 'Insert a citation',
	description: 'Project:Wiki_Ed/tour/be_bold8',
	onShow: gt.getPageAsDescription,
	attachTo: '.oo-ui-tool-name-citoid',
	position: 'right',
	buttons: [ {
		name: 'I inserted the citation.',
		onclick: function() { mw.libs.guiders.next(); } 
	} ],
	overlay: false,
	closeOnClickOutside: false,
    allowAutomaticOkay: false,
    allowAutomaticNext: false
} )
	.next( 'saveCitation' );


tour.step( {
	name: 'saveCitation',
	title: 'Save again.',
	onShow: gt.getPageAsDescription,
	description: 'Project:Wiki_Ed/tour/be_bold9',
	attachTo: '.ve-ui-toolbar-saveButton',
	position: 'bottomLeft',
	autoFocus: 'yes',
	overlay: false,
	closeOnClickOutside: false,
    allowAutomaticOkay: false,
    allowAutomaticNext: false
} )
	.listenForMwHooks( 've.deactivationComplete' )
	.transition( function () { if ( gt.isPostEdit() ) { return 'returnToTraining'; } } )
	.next( 'returnToTraining' );

tour.step( {
	name: 'returnToTraining',
	title: 'That\'s it!',
    description: 'Project:Wiki_Ed/tour/be_bold10',
    onShow: gt.getPageAsDescription,
	buttons: [ {
        name: 'Try it again.',
        action: 'externalLink',
        url: mw.util.getUrl( 'Special:MyPage/be_bold' ) + '?tour=outreachbebold&step=editButton&vehidebetadialog=1'
    }, {
	    name: 'Return to training.',
        action: 'externalLink',
        url: 'https://outreachdashboard.wmflabs.org/training/editing-wikipedia/editing-basics/be-bold-tutorial'        
    } ],
    overlay: true,
	closeOnClickOutside: false,
    allowAutomaticOkay: false,
    allowAutomaticNext: false
} );

} );
} ( mediaWiki.guidedTour ) );