มีเดียวิกิ:Guidedtour-tour-twa2.js
หมายเหตุ: หลังเผยแพร่ คุณอาจต้องล้างแคชเว็บเบราว์เซอร์ของคุณเพื่อดูการเปลี่ยนแปลง
- ไฟร์ฟอกซ์ / ซาฟารี: กด Shift ค้างขณะคลิก Reload หรือกด Ctrl-F5 หรือ Ctrl-R (⌘-R บนแมค)
- กูเกิล โครม: กด Ctrl-Shift-R (⌘-Shift-R บนแมค)
- อินเทอร์เน็ตเอกซ์พลอเรอร์ และ Edge: กด Ctrl ค้างขณะคลิก Refresh หรือกด Ctrl-F5
- โอเปร่า: กด Ctrl-F5
// The Wikipedia Adventure Mission 2
( 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' : 'สารใหม่ (สร้างอัตโนมัติโดย [[WP:The Wikipedia Adventure|The Wikipedia Adventure]])',
'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: 'twa2',
shouldLog: true,
steps: [ {
//1
title: 'เริ่มภารกิจที่ 2!',
description: '<br><div align="right">[[File:TWA_guide_right_top.png|link=]]</div>ยินดีที่ได้พบคุณอีก ภารกิจที่เรากำลังจะทำต่อไปนี้คือ ภารกิจสื่อสารกับผู้เขียนคนอื่น<br><br>',
onShow: gt.parseDescription,
overlay: true,
closeOnClickOutside: false,
buttons: [ {
name: 'เริ่มกันเลย',
action: 'next',
} ],
allowAutomaticOkay: false
}, {
//2
title: 'หน้าพูดคุย',
description: '<br><div align="right">[[File:TWA_guide_right_top.png|link=]]</div>เช่นเดียวกับหน้าผู้ใช้ ผู้เขียนทุกคนมีหน้าพูดคุยของตัวเอง คนสามารถส่งสารหาคุณได้<br><br>ดูนี่สิ...มีบางคนส่งสารหาคุณ<br><br>',
onShow: gt.parseDescription,
overlay: false,
closeOnClickOutside: false,
buttons: [ {
name: '<big>←</big>',
action: 'externalLink',
url: mw.util.getUrl( 'Wikipedia:TWA/2/Start' ) + '?tour=twa2&step=1'
} , {
name: 'ดูสารใหม่ของคุณ*',
onclick: function() { if(!mw.config.get('wgUserName')){ alert( "กรุณาล็อกอิน" ); return; } sendMessage( 'User talk:' + mw.config.get( 'wgUserName' ) + '/TWA', 'Wikipedia:TWA/MyTalk/1' , mw.util.getUrl( 'Special:MyTalk/TWA' ) + '?tour=twa2&step=3'); }
} ],
allowAutomaticOkay: false
}, {
//3
title: 'คนจริง ๆ',
description: '<br><div align="left">[[File:TWA_guide_left_top.png|link=]]</div>ว้าว ดีเลย มีคนจริง ๆ ที่นี่เหมือนกับฉัน<br><br>มาตอบสารหน้าพูดคุยกันหน่อย<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( 'Wikipedia:TWA/2/Start' ) + '?tour=twa2&step=2'
} , {
name: 'ตอบ Will',
action: 'externalLink',
url: mw.util.getUrl( 'Wikipedia:TWA/2/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: '<big>←</big>',
action: 'externalLink',
url: mw.util.getUrl( 'Special:MyTalk/TWA' ) + '?tour=twa2&step=3'
} ],
}, {
//5
title: 'เขียนคำตอบของคุณ',
description: '<br>คลิก "แก้ไข" เพื่อคุณสามารถส่งสารถึง Will<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( 'Wikipedia:TWA/2/Will' ) + '?tour=twa2&step=4'
} ],
shouldSkip: function() {
return gt.hasQuery( { action: 'edit' } );
}
}, {
//6
title: 'คัดลอกสารของคุณ',
description: '<br><div align="left">[[File:TWA_guide_left_top.png|link=]]</div>การคัดลอกและวางเป็นคำตอบที่ดีที่สุดเข้าไปในกล่องข้อความแก้ไขที่ด้านล่างใต้สารของ Will ถึงคุณ<br><br>:ขอบคุณมากสำหรับการต้อนรับอย่างเป็นมิตรของคุณ <nowiki>[[User:WillKomen]]</nowiki> ฉันทนรอที่จะเริ่มต้นแก้ไข้ไม่ได้แล้ว! <nowiki>~~~~</nowiki><br>',
onShow: gt.parseDescription,
overlay: false,
attachTo: '#wpTextbox1',
position: 'bottomRight',
closeOnClickOutside: false,
buttons: [ {
name: '<big>←</big>',
action: 'externalLink',
url: mw.util.getUrl( 'Special:MyTalk/TWA' ) + '?tour=twa2&step=5'
} , {
name: 'คัดลอกแล้ว',
action: 'next',
} ],
allowAutomaticOkay: false
}, {
//7
title: 'สามอย่างคร่าว ๆ',
description: '<br><b>ย่อหน้า</b> คำตอบด้วยเครื่องหมายทวิภาค <code > : </code> เพื่อเลื่อนข้อความไปทางขวาหนึ่งช่องและเพื่อแสดงว่าคุณกำลังตอบสาร<br><br> <b>ลงชื่อ</b> สารด้วย <code><nowiki>~~~~</nowiki></code> เพื่อแสดงชื่อผู้ใช้ของคุณตรงคำตอบของคุณ หรือใช้ปุ่มลายเซ็น [[File:Insert-signature.png]] เราลงชื่อเฉพาะหน้าพูดคุยเท่านั้น ไม่ใช้กับหน้าบทความ<br><br><b>แจ้ง</b> Will ว่าคุณตอบแล้วโดยพิมพ์ชื่อของเขาไว้ที่หนึ่งในคำตอบของคุณ เช่น <code><nowiki>[[User:WillKomen]]</nowiki></code> หากคุณกำลังอยู่ในหน้าพูดคุยกับผู้ใช้ของ Will ระบบจะแจ้งเขาอัตโนมัติ',
attachTo: '#wpTextbox1',
position: 'bottomRight',
onShow: gt.parseDescription,
overlay: false,
closeOnClickOutside: false,
buttons: [ {
name: '<big>←</big>',
action: 'externalLink',
url: mw.util.getUrl( 'Special:MyTalk/TWA' ) + '?tour=twa2&step=6&action=edit'
} , {
name: 'เข้าใจแล้ว',
action: 'next'
} ],
allowAutomaticOkay: false,
} , {
//8
title: 'คำอธิบายอย่างย่อการแก้ไขและบันทึก',
description: '<br>เพิ่มคำอธิบายอย่างย่อ เช่น "ขอขอบคุณสำหรับการต้อนรับอย่างอบอุ่น"<br><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:MyTalk/TWA' ) + '?tour=twa2&step=7&action=edit'
} ],
shouldSkip: function() {
return gt.isPostEdit();
},
buttons: postEditButtons
} , {
//9
title: 'ย่อหน้า ลงชื่อและแจ้งแล้ว!',
description: 'ได้เครื่องมือใหม่: <b>ตราผู้สื่อสาร</b><center>[[File:TWA badge 3.png|250px|link=]]</center><br>',
onShow: gt.parseDescription,
overlay: false,
closeOnClickOutside: false,
buttons: [ {
name: '<big>←</big>',
action: 'externalLink',
url: mw.util.getUrl( 'Special:MyTalk/TWA' ) + '?tour=twa2&step=8&action=edit'
} , {
name: 'คุยต่อ*',
onclick: function() { if(!mw.config.get('wgUserName')){ alert( "Please login." ); return; } sendMessage( 'User:' + mw.config.get( 'wgUserName' ), 'Wikipedia:TWA/Badge/3template2' , mw.util.getUrl( 'Wikipedia:TWA/2/Start' ) + '?tour=twa2&step=10'); }
} ],
allowAutomaticOkay: false
} , {
//10
title: 'พลังการสื่อสาร!',
description: '<br><div align="right">[[File:TWA_guide_right_top.png|link=]]</div>นี่ ถ้าคุณกำลังมีการสนทนาคราวละมาก ๆ ล่ะ คุณจะติดตามทั้งหมดได้อย่างไร<br><br>',
onShow: gt.parseDescription,
overlay: false,
closeOnClickOutside: false,
allowAutomaticOkay: false,
buttons: [ {
name: '<big>←</big>',
action: 'externalLink',
url: mw.util.getUrl( 'Special:MyTalk/TWA' ) + '?tour=twa2&step=9'
} , {
name: 'ปัญหาที่ดีมี...',
action: 'next'
} ],
}, {
//11
title: 'ทางออก',
description: '<br>รายการเฝ้าดู เป็นฟีดการเปลี่ยนแปลงบทความและหน้าที่คุณเลือกติดตามของคุณเอง<br><br>ในการติดตามหน้าหนึ่ง ๆ เพียงคลิกดาว [[File:Vector_skin_-_page_not_in_the_watchlist.png]] ที่อยู่ด้านบนของหน้านั้น เมื่อกลายเป็นสีน้ำเงินแล้ว [[File:Vector_skin_-_page_in_the_watchlist.png]] แปลว่า คุณกำลังติดตามหน้านั้น (คุณยังสามารถตั้งค่าของคุณให้ติดตามทุกหน้าที่คุณแก้ไขอัตโนมัติ)<br><br>คลิก รายการเฝ้าดู',
attachTo: '#pt-watchlist',
position: 'bottom',
onShow: gt.parseDescription,
overlay: false,
closeOnClickOutside: false,
allowAutomaticOkay: false,
buttons: [ {
name: '<big>←</big>',
action: 'externalLink',
url: mw.util.getUrl( 'Special:MyTalk/TWA' ) + '?tour=twa2&step=10'
} ],
shouldSkip: function() {
return gt.isPage( 'พิเศษ:รายการเฝ้าดู' );
}
} , {
//12
title: 'ลองดูรายการเฝ้าดูของคุณ',
description: '<br><div align="left">[[File:TWA_guide_left_top.png|link=]]</div>ส่วนที่เรียบร้อย <i>มาก</i> มากของวิกิพีเดีย คือ การแก้ไขทุกครั้งถูกบันทึกไว้ เพื่อให้คนสามารถตรวจสอบงานของผู้อื่นได้ เพราะเราจะไปได้ดีที่สุดเมื่อเรามีความช่วยเหลือ<br><br>',
onShow: gt.parseDescription,
attachTo: '#content.mw-body',
position: 'bottom',
overlay: false,
closeOnClickOutside: false,
allowAutomaticOkay: false,
buttons: [ {
name: '<big>←</big>',
action: 'externalLink',
url: mw.util.getUrl( 'Special:MyTalk/TWA' ) + '?tour=twa2&step=11'
} , {
name: 'คำขวัญของเรา',
action: 'next'
} ],
} , {
//13
title: 'ขอให้กล้า',
description: 'นอกจากนี้ การทำทุกสิ่งอย่างพังที่นี่เป็นไปได้ยาก เพราะคุณสามารถเปลี่ยนกลับไปรุ่นเก่ากว่าของหน้าได้เสมอ<br><br>รู้สึกผ่อนคลายขึ้นใช่ไหม<br><br> นั่นจึงเป็นเหตุผลว่าคำขวัญของเราบนวิกิพีเดีย คือ <b>ขอให้กล้า!</b><br><br>',
onShow: gt.parseDescription,
overlay: true,
closeOnClickOutside: false,
allowAutomaticOkay: false,
buttons: [ {
name: '<big>←</big>',
action: 'externalLink',
url: mw.util.getUrl( 'พิเศษ:รายการเฝ้าดู' ) + '?tour=twa2&step=12'
} , {
name: 'นอกเหนือจากรายการเฝ้าดู',
action: 'next'
} ],
} , {
//14
title: 'ติดตามการมีส่วนร่วมของคุณ',
description: '<br>นอกเหนือจากการติดตามการเปลี่ยนแปลงทุกหน้าที่คุณติดตามในรายการเฝ้าดูของคุณแล้ว คุณยังสามารถติดตามเฉพาะการแก้ไขของคุณเองได้<br><br>คลิก เรื่องที่เขียน',
onShow: gt.parseDescription,
overlay: false,
attachTo: '#pt-mycontris',
position: 'bottomLeft',
closeOnClickOutside: false,
allowAutomaticOkay: false,
buttons: [ {
name: '<big>←</big>',
action: 'externalLink',
url: mw.util.getUrl( 'พิเศษ:รายการเฝ้าดู' ) + '?tour=twa2&step=13'
} ],
shouldSkip: function() {
return gt.isPage( 'พิเศษ:เรื่องที่เขียน/' + mw.config.get( 'wgUserName' ).replace(/ /g, '_') );
}
} , {
//15
title: 'งานทั้งหมดของคุณ',
description: '<br>นี่คือการเข้ามีส่วนร่วมของคุณจนถึงบัดนี้ ทั้งหมดอยู่ในหน้าผู้ใช้และหน้าพูดคุยของคุณ...<br><br>ลองดูว่าเราจะทำอะไรกับเรื่องนี้ได้ไหม<br><br>โอ้ เดี๋ยวนะ ดูเหมือนคุณมีสารใหม่<br><br>',
onShow: gt.parseDescription,
overlay: false,
closeOnClickOutside: false,
buttons: [ {
name: '<big>←</big>',
action: 'externalLink',
url: mw.util.getUrl( 'พิเศษ:รายการเฝ้าดู' ) + '?tour=twa2&step=14'
} , {
name: 'ดูสารใหม่ของคุณ*',
onclick: function() { if(!mw.config.get('wgUserName')){ alert( "กรุณาล็อกอิน" ); return; } sendMessage( 'User talk:' + mw.config.get( 'wgUserName' ) + '/TWA', 'Wikipedia:TWA/MyTalk/2' , mw.util.getUrl( 'Special:MyTalk/TWA' ) + '?tour=twa2&step=16'); }
} ],
allowAutomaticOkay: false
} , {
//16
title: 'คำเชิญชวน',
description: '<br><div align="right">[[File:TWA_guide_right_top.png|link=]]</div>เจ๋ง มีเรื่องให้จัดการ...<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 ('พิเศษ:เรื่องที่เขียน/' ) + mw.config.get( 'wgUserName' ) + '?tour=twa2&step=15'
} , {
name: 'ตอบ GaiaGirl',
action: 'externalLink',
url: mw.util.getUrl( 'Wikipedia:TWA/2/Gaia' ) + '?tour=twa2&step=17'
} ],
allowAutomaticOkay: false
}, {
//17
title: 'ท้าทายตัวเอง...',
description: 'คำใบ้: คุณสามารถเรียนรู้จากการทำผิดได้มากพอ ๆ กับการทำถูกต้อง และคุณสามารถลองใหม่ได้เรื่อย ๆ!',
attachTo:'#contentSub',
position: 'bottom',
onShow: gt.parseDescription,
overlay: false,
closeOnClickOutside: false,
allowAutomaticOkay: false,
buttons: [ {
name: '<big>←</big>',
action: 'externalLink',
url: mw.util.getUrl ( 'Special:MyTalk/TWA' ) + '?tour=twa2&step=16'
} ],
}, {
//18
title: 'ตอบ',
description: '<br>คลิก แก้ เพื่อคุณสามารถส่งคำตอบถึง GaiaGirl<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 ( 'Wikipedia:TWA/2/Gaia' ) + '?tour=twa2&step=17'
} ],
shouldSkip: function() {
return gt.hasQuery( { action: 'edit' } );
}
}, {
//19
title: 'เขียนสารของคุณ',
description: '<br>คัดลอกคำตอบของคุณเข้าไปในกล่องข้อความที่ด้านล่างใต้สารของ GaiaGirl<br><br>:ยอดเยี่ยม <nowiki>[[User:GaiaGirl86]]</nowiki> นี่คือดาวเคราะห์โปรดของฉัน! ฉันมาที่นี่ได้อย่างไร <nowiki>~~~~</nowiki><br>',
onShow: gt.parseDescription,
overlay: false,
attachTo: '#wpTextbox1',
position: 'bottomRight',
closeOnClickOutside: false,
buttons: [ {
name: '<big>←</big>',
action: 'externalLink',
url: mw.util.getUrl ( 'Special:MyTalk/TWA' ) + '?tour=twa2&step=18'
} , {
name: 'คัดลอกแล้ว',
action: 'next'
} ],
allowAutomaticOkay: false
}, {
//20
title: 'คำอธิบายอย่างย่อและบันทึก',
description: '<br>เพียงใส่คำอธิบายอย่างย่อการแก้ไข เอาเป็น "ฉันยินดีช่วย"<br><br>แล้วบันทึกเมื่อคุณพร้อม<br><br>',
onShow: gt.parseDescription,
overlay: false,
attachTo: '#wpSave',
position: 'bottom',
autoFocus: 'yes',
closeOnClickOutside: false,
allowAutomaticOkay: false,
buttons: [ {
name: '<big>←</big>',
action: 'externalLink',
url: mw.util.getUrl ( 'Special:MyTalk/TWA' ) + '?tour=twa2&step=19&action=edit'
} ],
shouldSkip: function() {
return gt.isPostEdit();
},
buttons: postEditButtons
} , {
//21
title: 'ติ๊ก ต่อก ติ๊ก ต่อก',
description: '<br><div align="right">[[File:TWA_guide_right_top.png|link=]]</div>นี่ ลองโหลดหน้าใหม่ดูว่า GaiaGirl ตอบแล้วหรือยัง!',
onShow: gt.parseDescription,
overlay: false,
closeOnClickOutside: false,
allowAutomaticOkay: false,
buttons: [ {
name: '<big>←</big>',
action: 'externalLink',
url: mw.util.getUrl ( 'Special:MyTalk/TWA' ) + '?tour=twa2&step=20&action=edit'
} , {
name: 'หมุนโลกไปรอบ ๆ*',
onclick: function() { if(!mw.config.get('wgUserName')){ alert( "กรุณาล็อกอิน" ); return; } sendMessage( 'User talk:' + mw.config.get( 'wgUserName' ) + '/TWA', 'Wikipedia:TWA/MyTalk/3' , mw.util.getUrl( 'Special:MyTalk/TWA' ) + '?tour=twa2&step=22'); }
} ],
} , {
//22
title: 'ทิศทาง?',
description: '<br><div align="right">[[File:TWA_guide_right_top.png|link=]]</div>ฉันจะพาคุณไปที่นั่น ตามฉันไปโลก<br><br>',
onShow: gt.parseDescription,
overlay: false,
attachTo: '#content.mw-body',
position: 'bottom',
closeOnClickOutside: false,
allowAutomaticOkay: false,
buttons: [ {
name: '<big>←</big>',
action: 'externalLink',
url: mw.util.getUrl ( 'Special:MyTalk/TWA' ) + '?tour=twa2&step=21'
} , {
name: 'มุ่งหน้าไปโลก',
action: 'externalLink',
url: mw.util.getUrl( 'Wikipedia:TWA/2/End' ) + '?tour=twa2&step=23'
} ],
} , {
//23
title: 'คุณมาถึงจุดสิ้นสุดของภารกิจที่ 2!',
description: '<br>[[File:Ringtone (3).ogg]]<br><b>เดินทางต่อไปภารกิจที่ 3...</b>',
onShow: gt.parseDescription,
overlay: false,
closeOnClickOutside: false,
buttons: [ {
name: 'ยินดีกับตัวเองหน่อย!',
action: 'end'
} ],
}]
} );
} (window, document, jQuery, mediaWiki, mediaWiki.guidedTour ) ) ;