// উইকিপিডিয়া অ্যাডভেঞ্চার অভিযান ২    ( function ( window, document, $, mw, gt ) {  //automatic api:edit function to send yourself messages  function sendMessage( targetPage, msgPage, linkTo ) { 	var api = new mw.Api(); 	api.get( { 		'action' : 'query', 		'titles' : msgPage, 		'prop'   : 'revisions|info', 		'intoken' : 'edit', 		'rvprop' : 'content', 		'indexpageids' : 1 	} ).done( function (result) { 		result = result.query; 		var page = result.pages[result.pageids[0]]; 		var text = page.revisions[0]['*']; 		api.post( { 			'action' : 'edit', 			'title' : targetPage, 			'appendtext' : "\n" + text, 			'summary' : 'নতুন বার্তা (উইকিপিডিয়া অ্যাডভেঞ্চারের অংশ হিসাবে স্বয়ংক্রিয়ভাবে সিমুলেট)', 			'token' : page.edittoken 		} ).done( function () { 			window.location.href = linkTo; 		} ); 	} ); }   // Fail gracefully post-save but not postedit var postEditButtons = []; if ( mw.config.get( 'wgAction' ) === 'view' && !gt.isPostEdit() ) {         postEditButtons.push( {                 name: 'ফিরে যেতে এখানে ক্লিক করুন এবং একটি সম্পাদনা করুন',                 onclick: function() {                         window.location.href = new mw.Uri().extend( { action: 'edit' } ).toString();                 }         } ); }  // Fail gracefully post-save but not postedit for visual editor var postEditButtonsVisual = []; if ( mw.config.get( 'wgAction' ) === 'view' && !gt.isPostEdit() ) {         postEditButtonsVisual.push( {                 name: 'Go Back',                 onclick: function() {                         window.location.href = window.location.href + "&veaction=edit";                 }         } ); }  gt.defineTour( {         name: 'twa2',         shouldLog: true,         steps: [ {                 //1                 title: 'অভিযান ২ শুরু!',                 description: 'link= আপনাকে আবার দেখে খুশি হলাম। এই অভিযানে আমরা কিভাবে অন্য সম্পাদকদের সঙ্গে যোগাযোগ করতে হয় তা শিখার উদ্দেশ্যে যাব।',                 onShow: gt.parseDescription,                 overlay: true,                 closeOnClickOutside: false, 	            buttons: [ {                         name: 'Let\'s dive in',                         action: 'next',                          } ],                 allowAutomaticOkay: false           },  {                 //2                 title: 'আলাপ পাতা',                 description: 'link= ব্যবহারকারীর পাতার মত, প্রত্যেক সম্পাদকের তাঁদের নিজস্ব আলাপ পাতা আছে। যেখানে অন্যরা আপনাকে বার্তা দিতে পারে।আরে, এখানে তাকান...কেউ একজন আপনাকে একটি বার্তা পাঠিয়েছে।',                 onShow: gt.parseDescription,                 overlay: false,                 closeOnClickOutside: false, 		        buttons: [ {                         name: '←',                         action: 'externalLink',                         url: mw.util.getUrl( 'উইকিপিডিয়া:উইকিপিডিয়া_অ্যাডভেঞ্চার/২/শুরু' ) + '?tour=twa2&step=1'                           } , {                         name: 'আপনার নতুন বার্তা দেখুন*',                         onclick: function()  {  if(!mw.config.get('wgUserName')){  alert( "দয়া করে প্রবেশ করুন।" );   return;   } sendMessage( 'User talk:' + mw.config.get( 'wgUserName' ) + '/উইকিপিডিয়া অ্যাডভেঞ্চার', 'উইকিপিডিয়া:উইকিপিডিয়া_অ্যাডভেঞ্চার/আমার_আলাপ/১' , mw.util.getUrl( 'Special:MyTalk/উইকিপিডিয়া অ্যাডভেঞ্চার' ) + '?tour=twa2&step=3'); }                 } ],                 allowAutomaticOkay: false           },  {                 //3                 title: 'বাস্তব ব্যক্তি',                 description: 'link=বাহ, এটি চমৎকার ছিল। এখানে আমার মত বাস্তব মানুষ আছেচলুন আলাপ পাতার বার্তার উত্তর দেই।',                 onShow: gt.parseDescription,                 attachTo: '#content.mw-body',                 position: 'bottom',                 overlay: false,                 closeOnClickOutside: false,                 buttons: [ {                         name: '←',                         action: 'externalLink',                         url: mw.util.getUrl( 'উইকিপিডিয়া:উইকিপিডিয়া_অ্যাডভেঞ্চার/২/শুরু' ) + '?tour=twa2&step=2'                           } , {                          name: 'Reply to Will',                          action: 'externalLink',                          url: mw.util.getUrl( 'উইকিপিডিয়া:উইকিপিডিয়া_অ্যাডভেঞ্চার/২/Will' ) + '?tour=twa2&step=4'                 } ],                 allowAutomaticOkay: false				           },  {                 //4                 title: 'নিজেকে চ্যালেঞ্জ করুন...',                 description: 'ইঙ্গিত: আপনি যতটা ভুল থেকে শিখতে পারেন ঠিক ততটাই সঠিক থেকে। এবং আপনি সবসময় আবার চেষ্টা করতে পারেন!',                 attachTo:'#contentSub',                 position: 'bottom',                 onShow: gt.parseDescription,                 overlay: false,                 closeOnClickOutside: false,                 allowAutomaticOkay: false,                  buttons: [ {                         name: '←',                         action: 'externalLink',                         url: mw.util.getUrl( 'Special:MyTalk/উইকিপিডিয়া_অ্যাডভেঞ্চার' ) + '?tour=twa2&step=3'                           } ],          },  {                 //5                 title: 'আপনার উত্তর লিখুন',                 description: 'Click EDIT so you can leave your message to Will',                 attachTo: '#ca-edit',                 position: 'bottom',                 onShow: gt.parseDescription,                 overlay: false,                 closeOnClickOutside: false,                 allowAutomaticOkay: false,                 buttons: [ {                         name: '←',                         action: 'externalLink',                         url: mw.util.getUrl( 'উইকিপিডিয়া:উইকিপিডিয়া_অ্যাডভেঞ্চার/২/Will' ) + '?tour=twa2&step=4'                           } ],                 shouldSkip: function() {                         return gt.hasQuery( { action: 'edit' } );                 }          },  {                 //6                 title: 'আপনার বার্তা অনুলিপি (কপি) করুন',                 description: 'link=Copy and paste the best reply into the editing text box, at the bottom below Will\'s message to you:Thanks so much for your friendly welcome [[User:WillKomen]]. I can\'t wait to start editing! ~~~~',                 onShow: gt.parseDescription,                 overlay: false,                 attachTo: '#wpTextbox1',                  position: 'bottomRight',                 closeOnClickOutside: false,                 buttons: [ {                         name: '←',                         action: 'externalLink',                         url: mw.util.getUrl( 'Special:MyTalk/TWA' ) + '?tour=twa2&step=5'                           } , {                         name: 'Copied',                         action: 'next',                          } ],                 allowAutomaticOkay: false  },  {                 //7                 title: 'তিনটি দ্রুত জিনিস',                 description: 'Indent replies with a colon  :    to move the text one notch to the right and show you\'re responding to a message.  Sign messages with ~~~~ to leave your username on your reply--or use the File:Insert-signature.png signature button.  We only sign Talk pages, not Article pages.Notify Will that you replied by typing his name somewhere in your reply like [[User:WillKomen]].  If you\'re on Will\'s user talk page, it will notify him automatically.',                 attachTo: '#wpTextbox1',                  position: 'bottomRight',                 onShow: gt.parseDescription,                 overlay: false,                 closeOnClickOutside: false,                 buttons: [ {                         name: '←',                         action: 'externalLink',                         url: mw.util.getUrl( 'Special:MyTalk/TWA' ) + '?tour=twa2&step=6&action=edit'                           } , {                 	    name: 'Got it',                         action: 'next'                 } ],                 allowAutomaticOkay: false, 				 } , {                 //8                 title: 'সম্পাদনা সারাংশ ও সংরক্ষণ',                 description: 'Add an edit summary, something like: "Thanks for the warm welcome".Then SAVE when you\'re ready.',                 attachTo: '#wpSave',                 position: 'bottom',                 autoFocus: 'yes',                 onShow: gt.parseDescription,                 overlay: false,                 closeOnClickOutside: false, 	            allowAutomaticOkay: false, 	            buttons: [ {                         name: '←',                         action: 'externalLink',                         url: mw.util.getUrl( 'Special:MyTalk/TWA' ) + '?tour=twa2&step=7&action=edit'                           } ], 	            shouldSkip: function() {                         return gt.isPostEdit();                 },                 buttons: postEditButtons  } , {                 //9                 title: 'Indented, signed, and notified!',                 description: 'NEW TOOL EARNED:  Communicator Badge250px|link=',                  onShow: gt.parseDescription,                 overlay: false,                 closeOnClickOutside: false,                 buttons: [ {                         name: '←',                         action: 'externalLink',                         url: mw.util.getUrl( 'Special:MyTalk/TWA' ) + '?tour=twa2&step=8&action=edit'                           } , {                         name: 'Keep on talking*',                         onclick: function()  {  if(!mw.config.get('wgUserName')){  alert( "দয়া করে প্রবেশ করুন।" );   return;   } sendMessage( 'User:' + mw.config.get( 'wgUserName' ), 'উইকিপিডিয়া:উইকিপিডিয়া_অ্যাডভেঞ্চার/ব্যাজ/৩টেমপ্লেট২' , mw.util.getUrl( 'উইকিপিডিয়া:উইকিপিডিয়া_অ্যাডভেঞ্চার/২/শুরু' ) + '?tour=twa2&step=10'); }                  } ],                allowAutomaticOkay: false 		 } , {                 //10                 title: 'Communication power!',                 description: 'link=Hey, what if you\'re having lots of conversations at once? How can you keep track of them all?',                 onShow: gt.parseDescription,                 overlay: false,                 closeOnClickOutside: false,                 allowAutomaticOkay: false,                 buttons: [ {                         name: '←',                         action: 'externalLink',                         url: mw.util.getUrl( 'Special:MyTalk/TWA' ) + '?tour=twa2&step=9'                           } , {                 	    name: 'A good problem to have...',                         action: 'next'                } ],  }, {                 //11                 title: 'A solution',                 description: 'The Watchlist. Your very own feed of changes to the articles and pages you choose to follow.To follow a page just click the File:Vector_skin_-_page_not_in_the_watchlist.png star at the top center of it.  When it turnsFile:Vector_skin_-_page_in_the_watchlist.png blue, you\'re following! (You can also set your Preferences to automatically follow any page you edit).Click WATCHLIST.',                 attachTo: '#pt-watchlist',                 position: 'bottom',                  onShow: gt.parseDescription,                 overlay: false,                 closeOnClickOutside: false,                 allowAutomaticOkay: false,                 buttons: [ {                         name: '←',                         action: 'externalLink',                         url: mw.util.getUrl( 'Special:MyTalk/TWA' ) + '?tour=twa2&step=10'                           } ], 	            shouldSkip: function() {                         return gt.isPage( 'Special:Watchlist' );                 }                    } , {                 //12                 title: 'Check out your watchlist',                 description: 'link=A very neat part about Wikipedia is that every single edit is recorded. This lets people check out each other\'s work, because we\'re at our best when we have help.',                 onShow: gt.parseDescription,                 attachTo: '#content.mw-body',                 position: 'bottom',                 overlay: false,                 closeOnClickOutside: false,                 allowAutomaticOkay: false, 	            buttons: [ {                         name: '←',                         action: 'externalLink',                         url: mw.util.getUrl( 'Special:MyTalk/TWA' ) + '?tour=twa2&step=11'                           } , { 	            	    name: 'Our Motto',                         action: 'next'                } ],  } , {                 //13                 title: 'Be Bold',                 description: 'It\'s also really difficult to mess anything up here, because you can always just switch back to an older version of a page.Kind of a relief, right? That\'s why our motto on Wikipedia is to Be Bold!',                 onShow: gt.parseDescription,                 overlay: true,                 closeOnClickOutside: false,                 allowAutomaticOkay: false,                 buttons: [ {                         name: '←',                         action: 'externalLink',                         url: mw.util.getUrl( 'Special:Watchlist' ) + '?tour=twa2&step=12'                           } , {                 	    name: 'Beyond the watchlist',                         action: 'next'                } ],   } , {                 //14                 title: 'Track your contributions',                 description: 'In addition to tracking changes on all the pages you follow on your watchlist, you can also keep track of just your edits.Click CONTRIBUTIONS.',                 onShow: gt.parseDescription,                 overlay: false,                 attachTo: '#pt-mycontris',                 position: 'bottomLeft',                 closeOnClickOutside: false,                 allowAutomaticOkay: false,                 buttons: [ {                         name: '←',                         action: 'externalLink',                         url: mw.util.getUrl( 'Special:Watchlist' ) + '?tour=twa2&step=13'                           } ],                 shouldSkip: function() {                         return gt.isPage( 'Special:Contributions/' + mw.config.get( 'wgUserName' ).replace(/ /g, '_') );                 }   } , {                 //15                 title: 'All your work',                 description: 'Here are your contributions so far.  They\'re all to your userpage and Talk page...Let\'s see if we can do something about that.Oh, wait a second, it looks like you have a new message.',                 onShow: gt.parseDescription,                 overlay: false,                 closeOnClickOutside: false, 	            buttons: [ {                         name: '←',                         action: 'externalLink',                         url: mw.util.getUrl( 'Special:Watchlist' ) + '?tour=twa2&step=14'                           } , {                         name: 'আপনার নতুন বার্তা দেখুন*',                         onclick: function()  {  if(!mw.config.get('wgUserName')){  alert( "দয়া করে প্রবেশ করুন।" );   return;   } sendMessage( 'User talk:' + mw.config.get( 'wgUserName' ) + '/উইকিপিডিয়া_অ্যাডভেঞ্চার', 'উইকিপিডিয়া:উইকিপিডিয়া_অ্যাডভেঞ্চার/আমার_আলাপ/২' , mw.util.getUrl( 'Special:MyTalk/TWA' ) + '?tour=twa2&step=16'); }                 } ],                        allowAutomaticOkay: false  } , {                 //16                 title: 'An invitation',                 description: 'link=Neat, something to work on...',                 onShow: gt.parseDescription,                 attachTo: '#content.mw-body',                 position: 'bottom',                 overlay: false,                 closeOnClickOutside: false,                 buttons: [ {                         name: '←',                         action: 'externalLink',                         url: mw.util.getUrl ('Special:Contributions/' ) + mw.config.get( 'wgUserName' ) + '?tour=twa2&step=15'                           } , {                          name: 'Reply to GaiaGirl',                          action: 'externalLink',                          url: mw.util.getUrl( 'উইকিপিডিয়া:উইকিপিডিয়া_অ্যাডভেঞ্চার/২/Gaia' ) + '?tour=twa2&step=17'                 } ],                 allowAutomaticOkay: false				           },  {                 //17                 title: 'Challenge yourself...',                 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',                 onShow: gt.parseDescription,                 overlay: false,                 closeOnClickOutside: false,                 allowAutomaticOkay: false,                  buttons: [ {                         name: '←',                         action: 'externalLink',                         url: mw.util.getUrl ( 'Special:MyTalk/TWA' ) + '?tour=twa2&step=16'                           } ], 				         },  {                 //18                 title: 'Reply',                 description: 'Click EDIT so you can leave your reply to GaiaGirl',                 attachTo: '#ca-edit',                 position: 'bottom',                 onShow: gt.parseDescription,                 overlay: false,                 closeOnClickOutside: false,                 allowAutomaticOkay: false,                 buttons: [ {                         name: '←',                         action: 'externalLink',                         url: mw.util.getUrl ( 'উইকিপিডিয়া:উইকিপিডিয়া_অ্যাডভেঞ্চার/২/Gaia' ) + '?tour=twa2&step=17'                           } ],                 shouldSkip: function() {                         return gt.hasQuery( { action: 'edit' } );                 } 				         },  {                 //19                 title: 'Write your message',                 description: 'Copy your reply into the text box at the bottom underneath GaiaGirl\'s message.:Awesome [[User:GaiaGirl86]], it\'s my favorite planet! How do I get there? ~~~~',                 onShow: gt.parseDescription,                 overlay: false,                 attachTo: '#wpTextbox1',                  position: 'bottomRight',                 closeOnClickOutside: false,                 buttons: [ {                         name: '←',                         action: 'externalLink',                         url: mw.util.getUrl ( 'Special:MyTalk/TWA' ) + '?tour=twa2&step=18'                           } , {                 	    name: 'Copied',                         action: 'next'                 } ],                 allowAutomaticOkay: false  },  {                 //20                 title: 'Edit summary and Save',                 description: 'Just add an edit summary.  How about, "I\'d love to help".Then SAVE when you\'re ready.',                 onShow: gt.parseDescription,                 overlay: false, 	            attachTo: '#wpSave',                 position:  'bottom', 	            autoFocus: 'yes',                 closeOnClickOutside: false,                 allowAutomaticOkay: false,                 buttons: [ {                         name: '←',                         action: 'externalLink',                         url: mw.util.getUrl ( 'Special:MyTalk/TWA' ) + '?tour=twa2&step=19&action=edit'                           } ], 	            shouldSkip: function() {                         return gt.isPostEdit();                 },                 buttons: postEditButtons  } , {                 //21                 title: 'Tic, toc, tic, toc',                 description: 'link=Hey, let\'s reload the page to see if GaiaGirl responded!',                 onShow: gt.parseDescription,                 overlay: false,                 closeOnClickOutside: false, 	            allowAutomaticOkay: false,                 buttons: [ {                         name: '←',                         action: 'externalLink',                         url: mw.util.getUrl ( 'Special:MyTalk/TWA' ) + '?tour=twa2&step=20&action=edit'                           } , {                          name: 'Spin Earth around*',                          onclick: function()  {  if(!mw.config.get('wgUserName')){  alert( "দয়া করে প্রবেশ করুন।" );   return;   } sendMessage( 'User talk:' + mw.config.get( 'wgUserName' ) + '/উইকিপিডিয়া_অ্যাডভেঞ্চার', 'উইকিপিডিয়া:উইকিপিডিয়া_অ্যাডভেঞ্চার/আমার_আলাপ/৩' , mw.util.getUrl( 'Special:MyTalk/উইকিপিডিয়া_অ্যাডভেঞ্চার' ) + '?tour=twa2&step=22'); }                 } ],  } , {                 //22                 title: 'Directions?',                 description: 'link=I\'ll take you there.  Follow me to EARTH.',                 onShow: gt.parseDescription,                 overlay: false,                 attachTo: '#content.mw-body',                 position: 'bottom',                 closeOnClickOutside: false, 	            allowAutomaticOkay: false,                 buttons: [ {                         name: '←',                         action: 'externalLink',                         url: mw.util.getUrl ( 'Special:MyTalk/উইকিপিডিয়া_অ্যাডভেঞ্চার' ) + '?tour=twa2&step=21'                           } , {                          name: 'Head to Earth',                          action: 'externalLink',                          url: mw.util.getUrl( 'উইকিপিডিয়া:উইকিপিডিয়া_অ্যাডভেঞ্চার/২/সমাপ্ত' ) + '?tour=twa2&step=23'                 } ],  } , {                 //23                 title: 'আপনি অভিযান ২-এর শেষ পর্যায়ে পৌঁছে গেছেন!',                 description: 'File:Ringtone (3).oggঅভিযান ৩-এ যাত্রা শুরু...',                 onShow: gt.parseDescription,                 overlay: false,                 closeOnClickOutside: false, 	            buttons: [ { 	            	    name: 'আমাকে অভিনন্দন!',                         action: 'end'                 } ],   }]   } );   } (window, document, jQuery, mediaWiki, mediaWiki.guidedTour ) ) ;