<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://boroondarawiki.org/index.php?action=history&amp;feed=atom&amp;title=MediaWiki%3AGuidedTour-tour-myfirstedit.js</id>
	<title>MediaWiki:GuidedTour-tour-myfirstedit.js - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://boroondarawiki.org/index.php?action=history&amp;feed=atom&amp;title=MediaWiki%3AGuidedTour-tour-myfirstedit.js"/>
	<link rel="alternate" type="text/html" href="https://boroondarawiki.org/index.php?title=MediaWiki:GuidedTour-tour-myfirstedit.js&amp;action=history"/>
	<updated>2026-07-07T13:39:38Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.6</generator>
	<entry>
		<id>https://boroondarawiki.org/index.php?title=MediaWiki:GuidedTour-tour-myfirstedit.js&amp;diff=1090&amp;oldid=prev</id>
		<title>Philip: From: https://phabricator.wikimedia.org/diffusion/EGTO/browse/master/modules/tours/firstedit.js</title>
		<link rel="alternate" type="text/html" href="https://boroondarawiki.org/index.php?title=MediaWiki:GuidedTour-tour-myfirstedit.js&amp;diff=1090&amp;oldid=prev"/>
		<updated>2017-04-30T03:38:12Z</updated>

		<summary type="html">&lt;p&gt;From: https://phabricator.wikimedia.org/diffusion/EGTO/browse/master/modules/tours/firstedit.js&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;// Guided Tour to help users make their first edit.&lt;br /&gt;
// Designed to work on any article, and can work for other sites with minor message changes.&lt;br /&gt;
&lt;br /&gt;
( function ( window, document, $, mw, gt ) {&lt;br /&gt;
	var hasEditSection, tour;&lt;br /&gt;
&lt;br /&gt;
	// Check if there are section edit links (used later)&lt;br /&gt;
	hasEditSection = $( &amp;#039;.mw-editsection&amp;#039; ).length &amp;gt; 0;&lt;br /&gt;
&lt;br /&gt;
	tour = new gt.TourBuilder( {&lt;br /&gt;
		name: &amp;#039;myfirstedit&amp;#039;,&lt;br /&gt;
		// Specify that we want logging for this tour&lt;br /&gt;
		shouldLog: true&lt;br /&gt;
	} );&lt;br /&gt;
&lt;br /&gt;
	tour.firstStep( {&lt;br /&gt;
		name: &amp;#039;intro&amp;#039;,&lt;br /&gt;
		title: &amp;#039;Edit the whole page…&amp;#039;,&lt;br /&gt;
		description: &amp;#039;Click the &amp;quot;Edit&amp;quot; button to make your changes.&amp;#039;,&lt;br /&gt;
		attachTo: &amp;#039;#ca-edit&amp;#039;,&lt;br /&gt;
		position: &amp;#039;bottom&amp;#039;,&lt;br /&gt;
		// This indicates that we don&amp;#039;t want an automatic next button,&lt;br /&gt;
		// even though we are specifying which step comes next.&lt;br /&gt;
		allowAutomaticNext: false,&lt;br /&gt;
		buttons: [ {&lt;br /&gt;
			// Custom logic to specify a button and its behavior&lt;br /&gt;
			// depending on whether there are sections on the page.&lt;br /&gt;
			action: hasEditSection ? &amp;#039;next&amp;#039; : &amp;#039;okay&amp;#039;,&lt;br /&gt;
			onclick: function () {&lt;br /&gt;
				if ( hasEditSection ) {&lt;br /&gt;
					mw.libs.guiders.next();&lt;br /&gt;
				} else {&lt;br /&gt;
					mw.libs.guiders.hideAll();&lt;br /&gt;
				}&lt;br /&gt;
			}&lt;br /&gt;
		} ]&lt;br /&gt;
	} )&lt;br /&gt;
	// At certain times, called transition points, the callback passed to .transition&lt;br /&gt;
	// will be called.  At those times, this tour checks if the user is editing.  If so,&lt;br /&gt;
	// the tour returns &amp;#039;preview&amp;#039;, indicating that the tour should transition to the&lt;br /&gt;
	// &amp;#039;preview&amp;#039; step automatically.&lt;br /&gt;
	.transition( function () {&lt;br /&gt;
		if ( gt.isEditing() ) {&lt;br /&gt;
			return &amp;#039;preview&amp;#039;;&lt;br /&gt;
		}&lt;br /&gt;
	} )&lt;br /&gt;
	.next( &amp;#039;editSection&amp;#039; );&lt;br /&gt;
&lt;br /&gt;
	tour.step( {&lt;br /&gt;
		name: &amp;#039;editSection&amp;#039;,&lt;br /&gt;
		title: &amp;#039;Or edit a section&amp;#039;,&lt;br /&gt;
		description: &amp;#039;There are &amp;quot;edit&amp;quot; links for each major section in a page, so you can focus on just that part.&amp;quot;,&amp;#039;,&lt;br /&gt;
		position: &amp;#039;right&amp;#039;,&lt;br /&gt;
		attachTo: &amp;#039;.mw-editsection&amp;#039;,&lt;br /&gt;
		// Automatically scroll to this step&lt;br /&gt;
		autoFocus: true,&lt;br /&gt;
		// Custom width, in pixels&lt;br /&gt;
		width: 300&lt;br /&gt;
	} )&lt;br /&gt;
	.transition( function () {&lt;br /&gt;
		if ( gt.isEditing() ) {&lt;br /&gt;
			return &amp;#039;preview&amp;#039;;&lt;br /&gt;
		} else if ( !hasEditSection ) {&lt;br /&gt;
			// Returning HIDE means that the tour should be hidden, but not ended.&lt;br /&gt;
			return gt.TransitionAction.HIDE;&lt;br /&gt;
		}&lt;br /&gt;
	} )&lt;br /&gt;
	.back( &amp;#039;intro&amp;#039; );&lt;br /&gt;
&lt;br /&gt;
	tour.step( {&lt;br /&gt;
		name: &amp;#039;preview&amp;#039;,&lt;br /&gt;
		title: &amp;#039;Preview your changes (optional)&amp;#039;,&lt;br /&gt;
		description: &amp;#039;Clicking &amp;quot;Show preview&amp;quot; allows you to check what the page will look like with your changes. Just don\&amp;#039;t forget to save!&amp;quot;,&amp;#039;,&lt;br /&gt;
		attachTo: &amp;#039;#wpPreview&amp;#039;,&lt;br /&gt;
		autoFocus: true,&lt;br /&gt;
		position: &amp;#039;top&amp;#039;,&lt;br /&gt;
		// This specifies that, unlike the default, the guider should not close when the user clicks outside of it.&lt;br /&gt;
		closeOnClickOutside: false&lt;br /&gt;
	} )&lt;br /&gt;
	.transition( function () {&lt;br /&gt;
		// isReviewing checks whether the user is either previewing or showing changes.&lt;br /&gt;
		if ( gt.isReviewing() ) {&lt;br /&gt;
			return &amp;#039;save&amp;#039;;&lt;br /&gt;
		} else if ( !gt.isEditing() ) {&lt;br /&gt;
			// When the user is on this step, but neither editing nor reviewing, this tour automatically ends.&lt;br /&gt;
			return gt.TransitionAction.END;&lt;br /&gt;
		}&lt;br /&gt;
	} )&lt;br /&gt;
	.next( &amp;#039;save&amp;#039; );&lt;br /&gt;
&lt;br /&gt;
	tour.step( {&lt;br /&gt;
		name: &amp;#039;save&amp;#039;,&lt;br /&gt;
		title: &amp;#039;You\&amp;#039;re almost done!&amp;#039;,&lt;br /&gt;
		description: &amp;#039;When you\&amp;#039;re ready, clicking &amp;quot;Save pages&amp;quot; will make your changes visible for everyone.&amp;#039;,&lt;br /&gt;
		attachTo: &amp;#039;#wpSave&amp;#039;,&lt;br /&gt;
		autoFocus: true,&lt;br /&gt;
		position: &amp;#039;top&amp;#039;,&lt;br /&gt;
		closeOnClickOutside: false&lt;br /&gt;
	} )&lt;br /&gt;
	.transition( function () {&lt;br /&gt;
		if ( !gt.isReviewing() ) {&lt;br /&gt;
			return gt.TransitionAction.END;&lt;br /&gt;
		}&lt;br /&gt;
	} )&lt;br /&gt;
	.back( &amp;#039;preview&amp;#039; );&lt;br /&gt;
&lt;br /&gt;
} ( window, document, jQuery, mediaWiki, mediaWiki.guidedTour ) );&lt;/div&gt;</summary>
		<author><name>Philip</name></author>
	</entry>
</feed>