ব্যবহারকারী:IqbalHossain/Guidedtour-tour-twa3.js

উইকিপিডিয়া, মুক্ত বিশ্বকোষ থেকে

লক্ষ্য করুন: প্রকাশ করার পর, পরিবর্তনগুলো দেখতে আপনাকে আপনার ব্রাউজারের ক্যাশে পরিষ্কার করার প্রয়োজন হতে পারে।

  • ফায়ারফক্স / সাফারি: পুনরায় লোড-এ ক্লিক করার সময় শিফট টিপে ধরে রাখুন, অথবা হয় Ctrl-F5 বা Ctrl-R টিপুন (ম্যাকে ⌘-R টিপুন)
  • গুগল ক্রোম: Ctrl-Shift-R (ম্যাকে ⌘-Shift-R) টিপুন
  • ইন্টারনেট এক্সপ্লোরার / এজ: Ctrl ধরে রাখা অবস্থায় Refresh-এ ক্লিক করুন, অথবা Ctrl-F5 টিপুন
  • অপেরা: Ctrl-F5 টিপুন।
// উইকিপিডিয়া অ্যাডভেঞ্চার অভিযান ৩
 
( 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' : 'সম্পাদনা',
			'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: 'ফিরে যান',
                onclick: function() {
                        window.location.href = window.location.href +
"&veaction=edit";
                }
        } );
}

gt.defineTour( {
        name: 'twa3',
        shouldLog: true,
        steps: [ {
                //1
                title: 'অভিযান ৩ শুরু!',
                description: '<br><div align="right">[[File:TWA_guide_right_top.png|link=]]</div>GaiaGirl পৃথিবী নিবন্ধে আমাদের জন্য অপেক্ষা করছে।<br><br>চলুন সেখান থেকে ঘুরে আসি।<br><br>',
                onShow: gt.parseDescription,
                overlay: true,
                closeOnClickOutside: false,
	            buttons: [ {
                        name: 'পৃথিবীর দিকে চলুন*',
                        onclick: function()  {  if(!mw.config.get('wgUserName')){  alert( "Please login." );   return;   } sendMessage( 'User:' + mw.config.get( 'wgUserName' ) + '/TWA/Earth', 'Wikipedia:TWA/Earth/1' , mw.util.getUrl( 'Special:MyPage/TWA/Earth' ) + '?tour=twa3&step=2'); }
                } ],
                allowAutomaticOkay: false
 
        },  {
                //2
                title: 'ও, এটিই তাহলে পৃথিবী!',
                description: '<br>উইকিপিডিয়ার নিবন্ধ যেকোন একটি বিষয় সর্ম্পকে বিশ্বকোষীয় ধারণা দেয়: তারা পাঠকদের সবকিছু সম্পর্কে সামান্য ধারণা দেয় যা জানা অতীব জরুরী।<br><br>',
                onShow: gt.parseDescription,
                overlay: false,
                closeOnClickOutside: false,
		        buttons: [ {
                        name: '<big>←</big>',
                        action: 'externalLink',
                        url: mw.util.getUrl( 'Wikipedia:TWA/3/Start' ) + '?tour=twa3&step=1'          
                } , {
		        	    name: 'এটা ব্যবহার করে দেখুন',
                        action: 'next',
                } ],
                allowAutomaticOkay: false
 
        },  {
                //3
                title: 'আপনি কি এমন কিছু দেখতে পাচ্ছেন যা ঠিক করা দরকার?',
                description: '<br><div align="left">[[File:TWA_guide_left_top.png|link=]]</div>আমি তথ্যে কয়েকটি বানান ভুল সম্পাদনা লক্ষ্য করছি। আপনি কয়টা দেখেছেন?<br><br>',
                attachTo: '#content.mw-body',
                position: 'bottom',
                onShow: gt.parseDescription,
                overlay: false,
                closeOnClickOutside: false,
                buttons: [ {
                        name: '<big>←</big>',
                        action: 'externalLink',
                        url: mw.util.getUrl( 'Special:MyPage/TWA/Earth' ) + '?tour=twa3&step=2'          
                } , {
                         name: 'বানান সংশোধনের জন্য অনুসন্ধান করুন',
                         action: 'next'
                } ],
                allowAutomaticOkay: false				
 
        },  {
                //4
                title: 'বানান যাচাই।',
                description:'<br>আপনি কি ৫টি খুজেঁ পেয়েছেন‍?<br><br>ততীয় -- <b>তৃতীয়</b><br>চর -- <b>চার/b><br>তন -- <b>তিন</b> <br>প্রানী -- <b>প্রাণী</b><br>মাণুষ -- <b>মানুষ</b>',
                attachTo: '#content.mw-body',
                position: 'bottom',
                onShow: gt.parseDescription,
                overlay: false,
                closeOnClickOutside: false,
	            allowAutomaticOkay: false,
                buttons: [ {
                        name: '<big>←</big>',
                        action: 'externalLink',
                        url: mw.util.getUrl( 'Special:MyPage/TWA/Earth' ) + '?tour=twa3&step=3'          
                } , {
                	    name:'সব খুজেঁ পেয়েছেন',
                        action: 'next',
                } ],

        },  {
                //5
                title: 'বানান সংশোধন',
                description: '<br>চলুন  আপনার সম্পাদনা দক্ষতার পরীক্ষ নেয়া যাক এবং  ঐ বানানগুলো ঠিক করুন। সম্পাদনা বাটনে ক্লিক করুন।<br><br>',
                attachTo: '#ca-edit',
                position: 'bottom',
                onShow: gt.parseDescription,
                overlay: false,
                closeOnClickOutside: false,
                allowAutomaticOkay: false,
                buttons: [ {
                        name: '<big>←</big>',
                        action: 'externalLink',
                        url: mw.util.getUrl( 'Special:MyPage/TWA/Earth' ) + '?tour=twa3&step=4'          
                } ],
                shouldSkip: function() {
                        return gt.hasQuery( { action: 'edit' } );
                }

        },  {
                //6
                title: '৫টি ঠিক করা হয়েছে',
                description: '<br>thurd -- <b>third</b><br>fore -- <b>four</b><br>tree -- <b>three</b> <br>aminals -- <b>animals</b><br>hughmans -- <b>humans</b>',
                onShow: gt.parseDescription,
                overlay: false,
                attachTo: '#wpTextbox1', 
                position: 'bottomRight',
                closeOnClickOutside: false,
                buttons: [ {
                        name: '<big>←</big>',
                        action: 'externalLink',
                        url: mw.util.getUrl( 'Special:MyPage/TWA/Earth' ) + '?tour=twa3&step=5'          
                } , {
                	    name: 'ঠিক করা হল',
                        action: 'next',
                        } ],
                allowAutomaticOkay: false

},  {
                //7
                title: 'সম্পাদনা সারাংশ, এবং সংরক্ষণ',
                description: '<br>যে ৫টি বানান আপনি ঠিক করেছেন সেগুলো দেখুন।<br><br>তারপর আপনি যদি নিশ্চিত হন তাহলে সংরক্ষণ করুন।',
	            attachTo: '#wpSave',
                position: 'bottom',
                autoFocus: 'yes',
                onShow: gt.parseDescription,
                overlay: false,
                closeOnClickOutside: false,
                allowAutomaticOkay: false,
                buttons: [ {
                        name: '<big>←</big>',
                        action: 'externalLink',
                        url: mw.util.getUrl( 'Special:MyPage/TWA/Earth' ) + '?tour=twa3&step=6&action=edit'          
                } ],
                shouldSkip: function() {
                        return gt.isPostEdit();
                },
                buttons: postEditButtons
 
} , {
                //8
                title: 'See boldly!',
                description: 'NEW TOOL EARNED:  <b>Copyeditor Badge</b><center>[[File:TWA badge 4.png|250px|link=]]</center><br>Wow. Now the whole world can see the improved version of the article you contributed to...pretty cool!<br><br>Let\'s make a few more changes.  Let\'s add bold around the first mention of <b>Earth</b> in the first sentence of the article.<br><br>This lets readers focus quickly on the main subject of the article. Click EDIT.<br><br>',
                onShow: gt.parseDescription,
                overlay: false,
                attachTo: '#ca-edit',
                position: 'bottom',
                closeOnClickOutside: false,
                allowAutomaticOkay: false,
                buttons: [ {
                        name: '<big>←</big>',
                        action: 'externalLink',
                        url: mw.util.getUrl( 'Special:MyPage/TWA/Earth' ) + '?tour=twa3&step=7&action=edit'          
                } ],
                shouldSkip: function() {
                        return gt.hasQuery( { action: 'edit' } );
                }
				
} , {
                //9
                title: 'Add bold!',
                description: '<br><div align="right">[[File:TWA_guide_right_top.png|link=]]</div>Just like before, to add bold, highlight the first mention of the word Earth and then click the B on the toolbar.<br><br>', 
                attachTo: '#wpTextbox1', 
                position: 'bottomRight',
                autoFocus: 'yes',
                onShow: gt.parseDescription,
                overlay: false,
                closeOnClickOutside: false,
	            buttons: [ {
                        name: '<big>←</big>',
                        action: 'externalLink',
                        url: mw.util.getUrl( 'Special:MyPage/TWA/Earth' ) + '?tour=twa3&step=8'          
                } , {
	            	    name: 'Bolded',
                        action: 'next',
                        } ],
                allowAutomaticOkay: false

} , {
                //10
                title: 'Edit summary, and Save',
                description: '<br>Let them know that you, "Added bold"<br><br>Then SAVE when you\'re ready.',
	            attachTo: '#wpSave',
                position: 'bottom',
                autoFocus: 'yes',
                onShow: gt.parseDescription,
                overlay: false,
                closeOnClickOutside: false,
                allowAutomaticOkay: false,
                buttons: [ {
                        name: '<big>←</big>',
                        action: 'externalLink',
                        url: mw.util.getUrl( 'Special:MyPage/TWA/Earth' ) + '?tour=twa3&step=9&action=edit'          
                } ],
                shouldSkip: function() {
                        return gt.isPostEdit();
                },
                buttons: postEditButtons

} , {
                //11
                title: 'Whew... This is exciting!',
                description: '<br><div align="left">[[File:TWA_guide_left_top.png|link=]]</div>You\'re getting the hang of this. You\'re going to do a lot of good here, I can sense it.<br><br>Hey you also have a new message...<br><br>',
                onShow: gt.parseDescription,
                overlay: false,
                closeOnClickOutside: false,
                allowAutomaticOkay: false,
                buttons: [ {
                        name: '<big>←</big>',
                        action: 'externalLink',
                        url: mw.util.getUrl( 'Special:MyPage/TWA/Earth' ) + '?tour=twa3&step=10&action=edit'          
                } , {
                        name: 'Check your new message*',
                        onclick: function()  {  if(!mw.config.get('wgUserName')){  alert( "Please login." );   return;   } sendMessage( 'User talk:' + mw.config.get( 'wgUserName' ) + '/TWA', 'Wikipedia:TWA/MyTalk/3a' , mw.util.getUrl( 'Special:MyTalk/TWA' ) + '?tour=twa3&step=12'); }
                } ],
 
} , {
                //12
                title: 'New content...',
                description: '<br><div align="left">[[File:TWA_guide_left_top.png|link=]]</div>Let\'s see what\'s new<br><br>',
                onShow: gt.parseDescription,
                attachTo: '#content.mw-body',
                position: 'bottom',
                overlay: false,
                closeOnClickOutside: false,
	            buttons: [ {
                        name: '<big>←</big>',
                        action: 'externalLink',
                        url: mw.util.getUrl( 'Special:MyPage/TWA/Earth' ) + '?tour=twa3&step=11'          
                } , {
                        name: 'Check out the new content*',
                        onclick: function()  {  if(!mw.config.get('wgUserName')){  alert( "Please login." );   return;   } sendMessage( 'User:' + mw.config.get( 'wgUserName' ), 'Wikipedia:TWA/Badge/4template2' , mw.util.getUrl( 'Wikipedia:TWA/3/End' ) + '?tour=twa3&step=13'); } 
                } ],
                allowAutomaticOkay: false

 } , {
                //13
                title: 'Mission 3 complete!',
                description: '<br>[[File:Wesnothmusic.ogg (short).ogg]]<br><b>Journey on to mission 4...</b>',
                onShow: gt.parseDescription,
                overlay: false,
                closeOnClickOutside: false,
	            buttons: [ {
	            	    name: 'Congrats me!',
                        action: 'end'
                } ],
                allowAutomaticOkay: false
 
}]
 
} );
 
} (window, document, jQuery, mediaWiki, mediaWiki.guidedTour ) ) ;