Jump to content

MediaWiki:Guidedtour-tour-twa6.js

From Wikipedia, the free encyclopedia
Note: After saving, you have to bypass your browser's cache to see the changes. Google Chrome, Firefox, Microsoft Edge and Safari: Hold down the ⇧ Shift key and click the Reload toolbar button. For details and instructions about other browsers, see Wikipedia:Bypass your cache.
// The Wikipedia Adventure Mission 6

( function ( window, document, $, mw, gt ) {
 
//automatic api:edit function to send yourself messages
function sendTalkMessage( targetPage, msgPage, linkTo, overwrite, isTalkPost) {
	if(!mw.config.get('wgUserName')) {  
		alert( "Please login." );   
		return;
	}
    var api = new mw.Api();
    api.get( {
        'action' : 'query',
        'titles' : msgPage+'|'+targetPage,
        'prop'   : 'revisions',
        'meta'   : 'tokens',
        'type'   : 'csrf',
        'rvprop' : 'content',
        'indexpageids' : 1
    } ).done( function (result) {
        result = result.query;
        var page = result.pages[result.pageids[1]];
        var text = page.revisions[0]['*'];
        text = text.replaceAll("<nowiki/>","");
        if (result.pageids[0] > 0) {
            var targetSrc = result.pages[result.pageids[0]];
            var srcText = targetSrc.revisions[0]['*'];
            if (!overwrite) {
            	// Check for duplicate talk messages with only the first 20 characters in case the messages subst into something different
            	if (isTalkPost && srcText.includes(text.substring(0, 20))) {
        			// Don't send duplicate badges/talk posts
        			window.location.href = linkTo;
        			return;
        		} else if (srcText.includes(text)) {
        			// Check for duplicate badges literally
        			window.location.href = linkTo;
        			return;
        		}
        		if (isTalkPost) {
            		// Preserve the banner for talk posts
	                text = srcText.replace("</div></div></div>","") + "\n" + text + "</div></div></div>"; 
            	} else {
            		// Otherwise just add for badges
            		text = srcText + "\n" + text;
            	}
           }
        }
        api.post( {
            'action' : 'edit',
            'title' : targetPage,
            'text' : text,
            'summary' : 'New Message (simulated automatically as part of [[WP:The Wikipedia Adventure|The Wikipedia Adventure]])',
            'token' : result.tokens.csrftoken
        } ).done( function () {
        	window.location.href = linkTo;
        } );
    } );
}
 
var tour = new gt.TourBuilder( {
        name: 'twa6',
});
var steps = [{
                //1
                title: 'Jumping right in. ',
                description: new gt.WikitextDescription('<br><div align="left">[[File:TWA_guide_left_top.png|link=]]</div>Let\'s head to the article talk page where GaiaGirl left a summary of the Nature Reviews Earth and Environment article in her own words.<br><br> It\'s important for Wikipedia editors to summarize sources in their own words, rather than directly copying material from elsewhere - Wikipedia does not tolerate plagiarism or copyright violations.'),
                overlay: true,
                buttons: [ {
                        name: 'Go to the Earth talk page*',
                        onclick: function() {sendTalkMessage( 'User talk:' + mw.config.get( 'wgUserName' ) + '/TWA/Earth', 'Wikipedia:TWA/Earth/Talk/2' , mw.util.getUrl( 'Special:MyTalk/TWA/Earth' ) + '?tour=twa6&step=2', false, true); }           
                } ],
		        allowAutomaticOkay: false
 
        },  {
                //2
                title: 'Cool!  New info.',
                description: new gt.WikitextDescription('<br><div align="left">[[File:TWA_guide_left_top.png|link=]]</div>Let\'s add that text to the article.<br><br>'),
                overlay: false,
                attachTo: '#content.mw-body',
                position: 'bottom',
                closeOnClickOutside: false,
                buttons: [ {
                        name: '<big>←</big>',
                        action: 'externalLink',
                        url: mw.util.getUrl( 'Wikipedia:TWA/6/Start' ) + '?tour=twa6&step=1'          
                } , {
                        name: 'Go to the Earth article',
                        action: 'externalLink',
                        url: mw.util.getUrl( 'Special:MyPage/TWA/Earth' ) + '?tour=twa6&step=3'      
                } ],
                allowAutomaticOkay: false,
 
        },  {
                title: 'Click edit.',
                description: new gt.WikitextDescription('<br>Click EDIT so you can add the summarized content<br><br>'),
                attachTo: '#ca-edit',
                position: 'bottom',
                overlay: false,
                closeOnClickOutside: false,
                allowAutomaticOkay: false,
                buttons: [ {
                        name: '<big>←</big>',
                        action: 'externalLink',
                        url: mw.util.getUrl( 'Special:MyTalk/TWA/Earth' ) + '?tour=twa6&step=2'          
                } ],
                skip: "vefork",
                hooks: "ve.activationComplete"

        },  {

                //4
                title: 'Add this!',
                description: new gt.WikitextDescription('<br>Science shows that Earth formed around 4.5 billion years ago. The organisms that live on Earth have completely changed its air (atmosphere); this is called a biosphere. 71% of Earth\'s surface is covered in salt water oceans. Earth is the only place in the Solar System where liquid water is known to exist at present. The other 29% is made of rocky land in the shape of continents and islands. Earth interacts with other objects in the Solar System, particularly the Sun and the Moon. The Earth orbits the Sun roughly once every 365.25 days. One spin is called a <i>day</i> and one orbit around the Sun is called a <i>year</i>. This is why there are 365 days in a year, but a leap day added to the calendar once every 4 years.<br><br>Then click PUBLISH CHANGES as before.'),
                closeOnClickOutside: false,
	            allowAutomaticOkay: false,
		        buttons: [ {
                        name: '<big>←</big>',
                        action: 'externalLink',
                        url: mw.util.getUrl( 'Special:MyPage/TWA/Earth' ) + '?tour=twa6&step=3'          
                }],
                skip: function(transitionEvent) {
                	return transitionEvent.type === gt.TransitionEvent.MW_HOOK && transitionEvent.hookName == "ve.saveDialog.stateChanged";
                },
                hooks: "ve.saveDialog.stateChanged"

        },  {
                //5
                title: 'Edit summary, and Publish',
                description: new gt.WikitextDescription('<br>Let them know that you, "Added more reliable, neutral info about Earth\'s history from the talk page".<br><br>Then PUBLISH when you\'re ready.<br><br>'),
                // Ideally this would be attached to the save dialog itself but since it is still loading when the tour event fires that doesn't work
                attachTo: "#footer",
                position:"bottom",
                overlay: false,
                closeOnClickOutside: false,
                allowAutomaticOkay: false,
                 buttons: [ {
                        name: 'Go back',
                        action: 'externalLink',
                        url: mw.util.getUrl( 'Special:MyPage/TWA/Earth' ) + '?tour=twa6&step=4&veaction=edit'          

                } ],
                skip: gt.isPostEdit,
        },  {
                //6
                title: 'Hey Look...',
                description: new gt.WikitextDescription('<br><div align="right">[[File:TWA_guide_right_top.png|link=]]</div>A New Message notification just came in!</br><br>'),
                overlay: false,
                closeOnClickOutside: false,
	            allowAutomaticOkay: false,
	            buttons: [ {
                        name: '<big>←</big>',
                        action: 'externalLink',
                        url: mw.util.getUrl( 'Special:MyPage/TWA/Earth' ) + '?tour=twa6&step=4&veaction=edit'          
                } , {
                        name: 'Check your messages*',
                        onclick: function()  { sendTalkMessage( 'User talk:' + mw.config.get( 'wgUserName' ) + '/TWA', 'Wikipedia:TWA/MyTalk/6' , mw.util.getUrl( 'Special:MyTalk/TWA' ) + '?tour=twa6&step=7', false, true); }           
                } ],

        },  {
                //7
                title: 'Good question',
                description: new gt.WikitextDescription('<br><div align="right">[[File:TWA_guide_right_top.png|link=]]</div>My inner orbit is feeling tingly.  I think you have another message...</br><br>'),
                overlay: false,
                attachTo: '#content.mw-body',
                position: 'bottom',
                closeOnClickOutside: false,
	            allowAutomaticOkay: false,
                buttons: [ {
                        name: '<big>←</big>',
                        action: 'externalLink',
                        url: mw.util.getUrl( 'Special:MyPage/TWA/Earth' ) + '?tour=twa6&step=6'          
                } , {
                        name: 'Reload the talk page*',
                        onclick: function()  {  sendTalkMessage( 'User talk:' + mw.config.get( 'wgUserName' ) + '/TWA', 'Wikipedia:TWA/MyTalk/7' , mw.util.getUrl( 'Special:MyTalk/TWA' ) + '?tour=twa6&step=8', false, true); }           
                } ],

},  {
                //8
                title: 'What\'s a citation, you ask?',
                description: new gt.WikitextDescription('<br><div align="left">[[File:TWA_guide_left_top.png|link=]]</div>Let\'s get to Earth and find out!<br><br>'),
                overlay: false,
                attachTo: '#content.mw-body',
                position: 'bottom',
                closeOnClickOutside: false,
	            allowAutomaticOkay: false,
	            back: true,
                buttons: [ {
                        name: 'Head to Earth*',
                        onclick: function()  {  sendTalkMessage( 'User:' + mw.config.get( 'wgUserName' ) + '/TWA/Earth', 'Wikipedia:TWA/Earth/cleanup' , mw.util.getUrl( 'Special:MyPage/TWA/Earth' ) + '?tour=twa6&step=9', true, true); }           
                } ],

} , {
                //9
                title: 'What\'s that thing?',
                description: new gt.WikitextDescription('<div align="left">[[File:TWA_guide_left_top.png|link=]]</div>That...CLEANUP TAG...doesn\'t look so good.  Let\'s check out the talk page to see what it means.'),
                overlay: false,
                attachTo: '.box-Unreferenced',
                position: 'bottom',
                closeOnClickOutside: false,
                buttons: [ {
                        name: '<big>←</big>',
                        action: 'externalLink',
                        url: mw.util.getUrl( 'Special:MyTalk/TWA' ) + '?tour=twa6&step=8'
                } , {
                        name: 'Take it to Talk*',
                        onclick: function() { sendTalkMessage( 'User talk:' + mw.config.get( 'wgUserName' ) + '/TWA/Earth', 'Wikipedia:TWA/Earth/Talk/3' , mw.util.getUrl( 'Special:MyTalk/TWA/Earth' ) + '?tour=twa6&step=10', false, true); }           
                } ],
                allowAutomaticOkay: false
				
} , {

                //10
                title: 'Reply to Taggy',
                description: new gt.WikitextDescription('<br><div align="left">[[File:TWA_guide_left_top.png|link=]]</div>Okay, stay cool.... deep breaths, deeeep breaths, deeeeeeeep breaaaaths.<br><br>What should we tell Taggy so that they know you understand sourcing policy, and were on your way to adding that info (as soon as you learned how)?<br><br>'),
                overlay: false,
                attachTo: '#content.mw-body',
                position: 'bottom',
                closeOnClickOutside: false,
                buttons: [ {
                        name: '<big>←</big>',
                        action: 'externalLink',
                        url: mw.util.getUrl( 'Special:MyPage/TWA/Earth' ) + '?tour=twa6&step=9'          
                } , {
                        name: 'Reply to Taggy!',
                        action: 'externalLink',
                        url: mw.util.getUrl( 'Wikipedia:TWA/6/Civil' ) + '?tour=twa6&step=11'
                        } ],
                allowAutomaticOkay: false

        },  {
                //11
                title: 'Challenge yourself BELOW...',
                description: 'Hint: you can learn as much from getting it wrong as getting it right.  And you can always try again!',
                attachTo:'#contentSub',
                position: 'bottom',
                buttons: [ {
                        name: '<big>←</big>',
                        action: 'externalLink',
                        url: mw.util.getUrl( 'Special:MyTalk/TWA/Earth' ) + '?tour=twa6&step=10'          
                } ],
                overlay: false,
                closeOnClickOutside: false,
                allowAutomaticOkay: false

},  {
                //12
                title: 'Well done',
                description: new gt.WikitextDescription('NEW TOOL EARNED:  <b>Civility Badge</b><div class="center">[[File:TWA badge 11.png|250px|link=]]</div><br>Reload the Earth talk page.<br>'),
                overlay: false,
                closeOnClickOutside: false,
                buttons: [ {
                        name: '<big>←</big>',
                        action: 'externalLink',
                        url: mw.util.getUrl( 'Wikipedia:TWA/6/Civil' ) + '?tour=twa6&step=11'  
                }, {    
                        name: 'Reload*',
                        onclick: function()  {  sendTalkMessage( 'User talk:' + mw.config.get( 'wgUserName' ) + '/TWA/Earth', 'Wikipedia:TWA/Earth/Talk/4' , mw.util.getUrl( 'Special:MyTalk/TWA/Earth' ) + '?tour=twa6&step=13', false, true); }           
                } ],
                allowAutomaticOkay: false

}, {

                //13
                title: 'Ok, Citation needed',
                description: new gt.WikitextDescription('<br><div align="right">[[File:TWA_guide_right_top.png|link=]]</div>Citing a source means saying where you found the information in an article.<br><br> A source used to support information is called a reference.<br><br>'),
                overlay: false,
                attachTo: '#content.mw-body',
                position: 'bottom',
                closeOnClickOutside: false,
                buttons: [ {
                        name: '<big>←</big>',
                        action: 'externalLink',
                        url: mw.util.getUrl( 'Wikipedia:TWA/6/Start' ) + '?tour=twa6&step=12'  
                }, {    
                        name: 'Inline magic*',
                        onclick: function()  { sendTalkMessage( 'User:' + mw.config.get( 'wgUserName' ), 'Wikipedia:TWA/Badge/11template2' , mw.util.getUrl( 'Wikipedia:TWA/6/Start' ) + '?tour=twa6&step=14', false, false); }
                } ],
                allowAutomaticOkay: false

} , {
                //14
                title: 'How and why citations',
                description: new gt.WikitextDescription('<br>I\'m going to show you how to add a reference in the article and how to do it using an inline citation.<br><br>An inline citation shows up as a [number] in the text of the article, and it links to a reference at the bottom.<br><br>We do that so readers know which part of the article a source backs up.<br><br>'),
                overlay: false,
                closeOnClickOutside: false,
	            allowAutomaticOkay: false,
                buttons: [ {
                        name: '<big>←</big>',
                        action: 'externalLink',
                        url: mw.util.getUrl( 'Special:MyTalk/TWA/Earth' ) + '?tour=twa6&step=13' 
                } , {        
                        name: 'Let\'s do this',
                        action: 'externalLink',
                        url: mw.util.getUrl( 'Special:MyPage/TWA/Earth' ) + '?tour=twa6&step=15'
                } ],

        },  {
                //15
                title: 'Click edit',
                description: new gt.WikitextDescription('<br>Click EDIT so you can add an inline citation.<br><br>'),
                attachTo: '#ca-edit',
                position: 'bottom',
                overlay: false,
                closeOnClickOutside: false,
                allowAutomaticOkay: false,
                buttons: [ {
                        name: '<big>←</big>',
                        action: 'externalLink',
                        url: mw.util.getUrl( 'Wikipedia:TWA/6/Start' ) + '?tour=twa6&step=14' 
                } ],
                skip: "vefork",
                hooks: "ve.activationComplete"

        },  {
              
                //16
                title: 'Citation steps',
                description: new gt.WikitextDescription('<br><div align="right">[[File:TWA_guide_right_top.png|link=]]</div>First, copy the URL of the source: <pre>https://www.nature.com/articles/s43017-019-0005-6</pre><br>The Visual editor is smart enough to automatically generate a citation with only a URL. This works well for scientific journals, and less well for other websites, so the citation may need tweaking.<br/>'),
                closeOnClickOutside: false,
                buttons: [ {
                        name: '<big>←</big>',
                        action: 'externalLink',
                        url: mw.util.getUrl( 'Special:MyPage/TWA/Earth' ) + '?tour=twa6&step=15' 
                } , { 
                	    name: 'Copied',
                        action: 'next',
                        } ],

} , {
                //17
                title: 'Cite it',
                description: new gt.WikitextDescription('<br>Place the mouse, after the period, of the sentence you want to source.  DON\'T paste the reference just yet.<br><br>Now, click the "[[File:OOjs UI icon quotes-ltr.svg]] Cite" icon on the editing toolbar.  Paste the URL in there!<br><br>After you\'ve pasted it, click CREATE, and then, once the citation has been created, click INSERT to add it.<br><br>'),
                overlay: false,
                attachTo: '.ve-ui-toolbar-group-citoid',
                position: 'bottom',
                closeOnClickOutside: false,
                allowAutomaticOkay: false,
                back: true,
                buttons: [ { 
                	    name: 'Reference added',
                        action: 'next',
                        } ],

} , {
                //18
                title: 'Add a REFLIST',
                description: new gt.WikitextDescription('<br><div align="left">[[File:TWA_guide_left_top.png|link=]]</div>To make the reference show up properly, add a REFERENCES section with a REFLIST<br><br>Click away from the citation and put the mouse at the bottom of the text, below the citation.<br><br>Copy this line there: <br><b><nowiki>{{reflist}}</nowiki></b><br><br>'),
                overlay: false,
                closeOnClickOutside: false,
                allowAutomaticOkay: false,
                back: true,
                buttons: [ { 
                	    name: 'Reflist added!',
                        action: 'next',
                        } ],

} , {
                //19
                title: 'Remove that tag :)',
                description: new gt.WikitextDescription('<br><div align="left">[[File:TWA_guide_left_top.png|link=]]</div>You solved the problem, so let\'s go delete the cleanup tag.<br><br>Go ahead, select the box, and press backspace to delete it. Begone!<br>Then click PUBLISH CHANGES.'),
                overlay: false,
                attachTo: '.box-Unreferenced',
                position: 'bottomRight',
                closeOnClickOutside: false,
                allowAutomaticOkay: false,
                back: true,
                buttons: [ ],
                skip: function(transitionEvent) {
                	return transitionEvent.type === gt.TransitionEvent.MW_HOOK && transitionEvent.hookName == "ve.saveDialog.stateChanged";
                },
                hooks: "ve.saveDialog.stateChanged"

} , {
                //20
                title: 'Edit summary, and Publish',
                description: new gt.WikitextDescription('<br>Let them know that you, "Added an inline citation for the reliable source and removed the cleanup tag".<br><br>Then PUBLISH when you\'re ready.<br><br>'),
                autoFocus: 'yes',
                // Ideally this would be attached to the save dialog itself but since it is still loading when the tour event fires that doesn't work
                attachTo: "#footer",
                position:"bottom",
                closeOnClickOutside: false,
                allowAutomaticOkay: false,
                buttons:  [ {
                        name: 'Go Back',
                        action: 'externalLink',
                        url: mw.util.getUrl( 'Special:MyPage/TWA/Earth' ) + '?tour=twa6&step=19&veaction=edit' 
                } ],
                skip: gt.isPostEdit
} , {
                //21
                title: 'Awesome job!',
                description: new gt.WikitextDescription('NEW TOOL EARNED:  <b>Citer Badge</b><div class="center">[[File:TWA badge 12.png|250px|link=]]</div><br>Look at that! Gosh that gets me every time. I just take so much pride in my—I mean your references. How do you feel? Good, I hope. You should, because you\'re learning. You\'re becoming a great editor! You impress me. You\'ve begun to master editing... policy... communication...references...navigation...<br>'),
                overlay: false,
                closeOnClickOutside: false,
                buttons: [ {
                        name: '<big>←</big>',
                        action: 'externalLink',
                        url: mw.util.getUrl( 'Special:MyPage/TWA/Earth' ) + '?tour=twa6&step=19&veaction=edit' 
                } , { 
                        name: 'What\'s next*',
                        onclick: function()  { sendTalkMessage( 'User:' + mw.config.get( 'wgUserName' ), 'Wikipedia:TWA/Badge/12template2' , mw.util.getUrl( 'Wikipedia:TWA/6/End' ) + '?tour=twa6&step=22', false, false); }
                } ],
                allowAutomaticOkay: false

} , {
                //22
                title: 'Mission 6 complete!',
                description: new gt.WikitextDescription('<br>[[File:MacLeod, Kevin - Stringed Disco (short).ogg]]<br><b>Journey on to mission 7, your skills are needed again!</b>'),
                overlay: false,
                closeOnClickOutside: false,
	            buttons: [ {
	            	    name: 'Congrats me!',
                        action: 'end'
                } ],
                allowAutomaticOkay: false
		         
}];
var sourceEditorStepOverrides = {
	4: {
                title: 'Add this!',
                description: new gt.WikitextDescription('<br><small>Science shows that Earth formed around 4.5 billion years ago. The organisms that live on Earth have completely changed its air (atmosphere); this is called a biosphere. 71% of Earth\'s surface is covered in salt water oceans. Earth is the only place in the Solar System where liquid water is known to exist at present. The other 29% is made of rocky land in the shape of continents and islands. Earth interacts with other objects in the Solar System, particularly the Sun and the Moon. The Earth orbits the Sun roughly once every 365.25 days. One spin is called a <i>day</i> and one orbit around the Sun is called a <i>year</i>. This is why there are 365 days in a year, but a leap day added to the calendar once every 4 years.</small><br><br>'),
                attachTo: '#wpTextbox1', 
                position: 'bottomRight',
                overlay: false,
                closeOnClickOutside: false,
	            allowAutomaticOkay: false,
		        buttons: [ {
                        name: '<big>←</big>',
                        action: 'externalLink',
                        url: mw.util.getUrl( 'Special:MyPage/TWA/Earth' ) + '?tour=twa6&step=3'          
                } , {
		        	    name: 'Added',
                        action: 'next',
                } ],
	}, 5: {
                title: 'Edit summary and Publish',
                description: new gt.WikitextDescription('<br>Let them know that you, "Added more reliable, neutral info about Earth\'s history from the talk page".<br><br>Then PUBLISH when you\'re ready.<br><br>'),
	            attachTo: '#wpSave',
                position: 'bottomRight',
                autoFocus: 'yes',
                overlay: false,
                closeOnClickOutside: false,
                allowAutomaticOkay: false,
                back: true,
                buttons:  [ ],
                skip: gt.isPostEdit
	}, 16: {
		        title: 'Citation steps',
                description: new gt.WikitextDescription('<br><div align="right">[[File:TWA_guide_right_top.png|link=]]</div>First copy the citation which describes the source.<br><br><b>Steffen, W., Richardson, K., Rockström, J. et al. The emergence and evolution of Earth System Science. Nature Reviews Earth & Environment. 1, 54–63 (2020). https.//doi.org/10.1038/s43017-019-0005-6. Retrieved {{currentdate}}.</b><br><br>'),
                overlay: false,
                attachTo: '#wpTextbox1', 
                position: 'bottomRight',
                closeOnClickOutside: false,
                buttons: [ {
                        name: '<big>←</big>',
                        action: 'externalLink',
                        url: mw.util.getUrl( 'Special:MyPage/TWA/Earth' ) + '?tour=twa6&step=15' 
                } , { 
                	    name: 'Copied',
                        action: 'next',
                        } ],
	}, 17: {
                title: 'Cite it',
                description: new gt.WikitextDescription('<br>Place the mouse, after the period, of the sentence you want to source.  DON\'T paste the reference just yet.<br><br>Now, click the [[File:OOjs UI icon reference.svg]] on the editing toolbar.  Paste the reference inside the <nowiki><ref></ref></nowiki> tags!'),
                overlay: false,
                attachTo: '#wpTextbox1', 
                position: 'bottomRight',
                closeOnClickOutside: false,
                allowAutomaticOkay: false,
                back: true,
                buttons: [ { 
                	    name: 'Reference added',
                        action: 'next',
               } ],
	}, 18: {
                title: 'Add a REFLIST',
                description: new gt.WikitextDescription('<br><div align="left">[[File:TWA_guide_left_top.png|link=]]</div>To make the reference show up properly, add a REFERENCES section with a REFLIST<br><br>Put the mouse at the bottom of the editing box.<br><br>Type: <br><b><nowiki>{{reflist}}</nowiki></b><br><br>'),
                overlay: false,
                attachTo: '#wpTextbox1', 
                position: 'bottomRight',
                closeOnClickOutside: false,
                allowAutomaticOkay: false,
                back: true,
                buttons: [ { 
                	    name: 'Reflist added!',
                        action: 'next',
                } ],
	}, 19: {
		        title: 'Remove that tag :)',
                description: new gt.WikitextDescription('<br><div align="left">[[File:TWA_guide_left_top.png|link=]]</div>You solved the problem, so let\'s go delete the cleanup tag.<br><br>Go ahead and find and delete: <b><nowiki>{{Unreferenced}}</nowiki></b>  Begone!<br><br>'),
                overlay: false,
                attachTo: '#wpTextbox1', 
                position: 'bottomRight',
                closeOnClickOutside: false,
                allowAutomaticOkay: false,
                back: true,
                buttons: [ { 
                	    name: 'Removed!',
                        action: 'next',
                } ],
	}, 20: {
		        title: 'Edit summary and publish',
                description: new gt.WikitextDescription('<br>Let them know that you, "Added an inline citation for the reliable source and removed the cleanup tag".<br><br>Then PUBLISH when you\'re ready.<br><br>'),
	            attachTo: '#wpSave',
                position: 'bottomRight',
                autoFocus: 'yes',
                overlay: false,
                closeOnClickOutside: false,
                allowAutomaticOkay: false,
                back: true,
                buttons: [ ],
                skip: gt.isPostEdit
	}
};
var stepBuilders = [];
var sStepBuilders = []; 
function makeSkip(target, query) {
	return function(event) {
		if (query(event)) {
			return target;
		}
	};
}
function makeVeSkip(target1, target2) {
	return function() {
		if (gt.isEditingWithVisualEditor()) {
			return target1;
		} else if (gt.isEditingWithWikitext()) {
			return target2;
		} 
	};
}
for (var i = 0; i < steps.length; i++) {
	var step = steps[i];
	step.allowAutomaticNext = false;
	step.name = (i+1).toString();
	var stepBuilder;
	if (i == 0) {
		stepBuilder = tour.firstStep(step);
	} else {
		stepBuilder = tour.step(step);
	}

	stepBuilders[i] = stepBuilder;
	if (sourceEditorStepOverrides[i]) {
		var sStep = sourceEditorStepOverrides[i];
		sStep.allowAutomaticNext = false;
		sStep.name = i.toString()+"src";
		sStepBuilders[i-1] = tour.step(sStep);
	}
}
for (var j = 0; j < steps.length; j++) {
	if (steps[j].hooks) {
		stepBuilders[j].listenForMwHooks(steps[j].hooks);
	}
	if (steps[j].skip) {
		if (steps[j].skip == "vefork") {
			stepBuilders[j].transition(makeVeSkip(stepBuilders[j+1], sStepBuilders[j+1]));
		} else {
			stepBuilders[j].transition(makeSkip(stepBuilders[j+1], steps[j].skip));
		}
	}
	if (sourceEditorStepOverrides[j] && sourceEditorStepOverrides[j].skip) {
		sStepBuilders[j-1].transition(makeSkip(sStepBuilders[j] || stepBuilders[j], sourceEditorStepOverrides[j].skip));
	}
	if (j > 0) {
		if (steps[j].back) {
			stepBuilders[j].back(stepBuilders[j-1]);
		}
		if (sStepBuilders[j-1] && sStepBuilders[j-2] && sourceEditorStepOverrides[j].back) {
			sStepBuilders[j-1].back(sStepBuilders[j-2]);
		}
	}
	if (j < steps.length - 1) {
		stepBuilders[j].next(stepBuilders[j+1]);
		if (sStepBuilders[j] && sStepBuilders[j+1]) {
			sStepBuilders[j].next(sStepBuilders[j+1]);
		}
	}
}
} (window, document, jQuery, mediaWiki, mediaWiki.guidedTour ) ) ;