Bước tới nội dung

Thành viên:Nvdtn19/Guidedtour-tour-twa5.js

Bách khoa toàn thư mở Wikipedia
Chú ý: Sau khi lưu thay đổi trang, bạn phải xóa bộ nhớ đệm của trình duyệt để nhìn thấy các thay đổi. Google Chrome, Firefox, Internet ExplorerSafari: Giữ phím ⇧ Shift và nhấn nút Reload/Tải lại trên thanh công cụ của trình duyệt. Để biết chi tiết và hướng dẫn cho các trình duyệt khác, xem Trợ giúp:Xóa bộ nhớ đệm.
// The Wikipedia Adventure Mission 5( function ( window, document, $, mw, gt ) { //automatic api:edit function to send yourself messagesfunction 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' : 'New Message (simulated automatically as part of [[WP:The Wikipedia Adventure|The Wikipedia Adventure]])', 'token' : page.edittoken } ).done( function () { window.location.href = linkTo; } ); } );} // Fail gracefully post-save but not posteditvar postEditButtons = [];if ( mw.config.get( 'wgAction' ) === 'view' && !gt.isPostEdit() ) { postEditButtons.push( { name: 'Click here to go back and make an edit', onclick: function() { window.location.href = new mw.Uri().extend( { action: 'edit' } ).toString(); } } );}// Fail gracefully post-save but not postedit for visual editorvar postEditButtonsVisual = [];if ( mw.config.get( 'wgAction' ) === 'view' && !gt.isPostEdit() ) { postEditButtonsVisual.push( { name: 'Go back and make an edit', onclick: function() { window.location.href = window.location.href +"&veaction=edit"; } } );}gt.defineTour( { name: 'twa5', shouldLog: true, steps: [ { //1 title: 'We\'re on! ', description: '<br><div align="right">[[File:TWA_guide_right_top.png|link=]]</div>SocraTease riddled us with a puzzling question: How do we know if information on Wikipedia is true?<br><br>This is a special question--that needs a special place to get a wise answer.<br><br>', overlay: true, onShow: gt.parseDescription, buttons: [ { name: 'Check out Teahouse', action: 'externalLink', url: mw.util.getUrl( 'Wikipedia:TWA/Teahouse' ) + '?tour=twa5&step=2'  } ], allowAutomaticOkay: false }, { //2 title: 'What\'s this Teahouse place?', description: '<br><div align="right">[[File:TWA_guide_right_top.png|link=]]</div>The Teahouse is a social space for asking questions about Wikipedia--and getting simple, clear answers from smart, welcoming helpers--any time you need it.<br><br>', onShow: gt.parseDescription, overlay: false, closeOnClickOutside: false, buttons: [ { name: '<big>←</big>', action: 'externalLink', url: mw.util.getUrl( 'Wikipedia:TWA/5/Start' ) + '?tour=twa5&step=1'  } , {  name: 'Drink some Tea', action:'next',  } ], allowAutomaticOkay: false,  }, { //3 title: 'Teahouse = Awesome.', description: '<br><div align="left">[[File:TWA_guide_left_top.png|link=]]</div>Asking for help is part of becoming a great editor. There\'s a lot to learn here, and lots of people who will lend you a hand.<br><br>', onShow: gt.parseDescription, overlay: false, closeOnClickOutside: false, allowAutomaticOkay: false, buttons: [ { name: '<big>←</big>', action: 'externalLink', url: mw.util.getUrl( 'Wikipedia:TWA/Teahouse' ) + '?tour=twa5&step=2'  } , {  name: 'Share the riddle with Teahouse', action: 'next', } ],   }, { //4 title: 'Ask away!', description: '<br>Truth and Wikipedia<br><br>"Hi, I\'m new here and trying to learn more about Wikipedia. I was wondering, how do you know that anything on Wikipedia is *true*?"<br><br>', onShow: gt.parseDescription, overlay: false, closeOnClickOutside: false, allowAutomaticOkay: false, buttons: [ { name: '<big>←</big>', action: 'externalLink', url: mw.util.getUrl( 'Wikipedia:TWA/Teahouse' ) + '?tour=twa5&step=3'  } , {  name: 'Post it!', action: 'externalLink', url: mw.util.getUrl( 'Wikipedia:TWA/Teahouse/1' ) + '?tour=twa5&step=5' } ],}, { //5 title: 'Asking is Awesome', description: 'NEW TOOL EARNED: <b>Researcher Badge</b><div class="center">[[File:TWA badge 7.png|250px|link=]]</div><br>Hey, you got a notification that someone replied to your Teahouse question<br>', onShow: gt.parseDescription, attachTo: '#content.mw-body', position: 'topRight', autoFocus: 'yes', overlay: false, closeOnClickOutside: false, buttons: [ { name: '<big>←</big>', action: 'externalLink', url: mw.util.getUrl( 'Wikipedia:TWA/Teahouse' ) + '?tour=twa5&step=4'  } , {  name: 'Check out the reply', action: 'externalLink', url: mw.util.getUrl( 'Wikipedia:TWA/Teahouse/2' ) + '?tour=twa5&step=6' } ], allowAutomaticOkay: false,  }, { //6 title: 'This is important', description: '<br><div align="right">[[File:TWA_guide_right_top.png|link=]]</div>So, we only write what we can verify in a published source. Not your own experience, original research, or personal opinions. Just published info.<br><br>', onShow: gt.parseDescription, overlay: false, attachTo: '#content.mw-body', position: 'bottomRight', closeOnClickOutside: false, buttons: [ { name: '<big>←</big>', action: 'externalLink', url: mw.util.getUrl( 'Wikipedia:TWA/Teahouse' ) + '?tour=twa5&step=5'  } , {  name: 'Dig into Verifiability*', onclick: function() { if(!mw.config.get('wgUserName')){ alert( "Please login." ); return; } sendMessage( 'User:' + mw.config.get( 'wgUserName' ), 'Wikipedia:TWA/Badge/7template2' , mw.util.getUrl( 'Wikipedia:TWA/5/V' ) + '?tour=twa5&step=7'); } } ],  allowAutomaticOkay: false}, { //7 title: 'Challenge yourself BELOW...', description: '', overlay: false, closeOnClickOutside: false, allowAutomaticOkay: false, buttons: [ { name: '<big>←</big>', action: 'externalLink', url: mw.util.getUrl( 'Wikipedia:TWA/Teahouse/2' ) + '?tour=twa5&step=6'  } ]} , { //8 title: 'You\'ve got Verifi-ability', description: 'NEW TOOL EARNED: <b>Verifiability Badge</b><div class="center">[[File:TWA badge 8.png|250px|link=]]</div><br>Let\'s put this new knowlege to use!<br>', onShow: gt.parseDescription, overlay: false, closeOnClickOutside: false, buttons: [ { name: '<big>←</big>', action: 'externalLink', url: mw.util.getUrl( 'Wikipedia:TWA/5/V' ) + '?tour=twa5&step=7'  } , {  name: 'Check your messages*', onclick: function() { if(!mw.config.get('wgUserName')){ alert( "Please login." ); return; } sendMessage( 'User talk:' + mw.config.get( 'wgUserName' ) + '/TWA', 'Wikipedia:TWA/MyTalk/5' , mw.util.getUrl( 'Special:MyTalk/TWA' ) + '?tour=twa5&step=9'); }  } ], allowAutomaticOkay: false} , { //9 title: 'Seeking sources', description: '<br><div align="left">[[File:TWA_guide_left_top.png|link=]]</div>Let\'s see what GaiaGirl came up with</br>', onShow: gt.parseDescription, overlay: false, attachTo: '#content.mw-body', position: 'bottom', closeOnClickOutside: false, buttons: [ { name: '<big>←</big>', action: 'externalLink', url: mw.util.getUrl( 'Wikipedia:TWA/5/Start' ) + '?tour=twa5&step=8'  } , {  name: 'Head to Earth\'s talk page*', onclick: function() { if(!mw.config.get('wgUserName')){ alert( "Please login." ); return; } sendMessage( 'User talk:' + mw.config.get( 'wgUserName' ) + '/TWA/Earth', 'Wikipedia:TWA/Earth/Talk/1' , mw.util.getUrl( 'Special:MyTalk/TWA/Earth' ) + '?tour=twa5&step=10'); }  } ], allowAutomaticOkay: false } , { //10 title: '3 Sources', description: '<br><div align="left">[[File:TWA_guide_left_top.png|link=]]</div>It looks like GaiaGirl gave you some options.<br><br>Verifiability tells us we want published reliable sources with a reputation for fact-checking and accuracy. Sources we can rely on.<br><br> ', onShow: gt.parseDescription, overlay: false, attachTo: '#content.mw-body', position: 'bottom', closeOnClickOutside: false, buttons: [ { name: '<big>←</big>', action: 'externalLink', url: mw.util.getUrl( 'Wikipedia:TWA/5/Start' ) + '?tour=twa5&step=9'  } , {  name: 'Which one of these would be best??', onclick: function() { if(!mw.config.get('wgUserName')){ alert( "Please login." ); return; } sendMessage( 'User:' + mw.config.get( 'wgUserName' ), 'Wikipedia:TWA/Badge/8template2' , mw.util.getUrl( 'Wikipedia:TWA/5/RS' ) + '?tour=twa5&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', onShow: gt.parseDescription, overlay: false, closeOnClickOutside: false, allowAutomaticOkay: false,  buttons: [ { name: '<big>←</big>', action: 'externalLink', url: mw.util.getUrl( 'Special:MyTalk/TWA/Earth' ) + '?tour=twa5&step=10'  }],}, { //12 title: 'You\'re getting pretty reliable yourself', description: 'NEW TOOL EARNED: <b>Sourcer Badge</b><div class="center">[[File:TWA badge 9.png|250px|link=]]</div><br>', onShow: gt.parseDescription, overlay: false, closeOnClickOutside: false, buttons: [ { name: '<big>←</big>', action: 'externalLink', url: mw.util.getUrl( 'Wikipedia:TWA/5/RS' ) + '?tour=twa5&step=11'  } , {  name: 'Reply to GaiaGirl*', onclick: function() { if(!mw.config.get('wgUserName')){ alert( "Please login." ); return; } sendMessage( 'User:' + mw.config.get( 'wgUserName' ), 'Wikipedia:TWA/Badge/9template2' , mw.util.getUrl( 'Wikipedia:TWA/5/Start' ) + '?tour=twa5&step=13'); } } ],  allowAutomaticOkay: false}, { //13 title: 'What now?', description: '<br><div align="right">[[File:TWA_guide_right_top.png|link=]]</div>Now that we have the source, what do we do with it?<br><br>First, let\'s leave a note on the talk page telling GaiaGirl86 about our thoughts.<br><br>Hmm... what to say?<br><br>', onShow: gt.parseDescription, overlay: false, closeOnClickOutside: false, buttons: [ { name: '<big>←</big>', action: 'externalLink', url: mw.util.getUrl( 'Special:MyTalk/TWA/Earth' ) + '?tour=twa5&step=12'  },{ name: 'Reply to GaiaGirl', action: 'externalLink', url: mw.util.getUrl( 'Wikipedia:TWA/5/Reply' ) + '?tour=twa5&step=14' } ], allowAutomaticOkay: false} , { //14 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', onShow: gt.parseDescription, overlay: false, closeOnClickOutside: false, allowAutomaticOkay: false,  buttons: [ { name: '<big>←</big>', action: 'externalLink', url: mw.util.getUrl( 'Wikipedia:TWA/5/Start' ) + '?tour=twa5&step=13'  }], }, { //15 title: 'Reply to GaiaGirl', description: '<br>Click EDIT SOURCE so you can leave your reply to 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/5/Reply' ) + '?tour=twa5&step=14'  }], shouldSkip: function() { return gt.hasQuery( { action: 'edit' } ); }  }, { //16 title: 'Copy your message at the bottom', description: '<br><div align="right">[[File:TWA_guide_right_top.png|link=]]</div>:Science and Nature Journal looks like a solid and relevant source with a good reputation. I think we can rely on it more than the others for this article. Nice research! <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/Earth' ) + '?tour=twa5&step=15'  } , { name: 'Copied', action: 'next', } ], } , { //17 title: 'Edit summary and Publish', description: '<br>How about "Thoughts on a reliable source". Then click PUBLISH to make it live.<br><br>', attachTo: '#wpSave', position: 'bottomRight', autoFocus: 'yes', onShow: gt.parseDescription, overlay: false, closeOnClickOutside: false, allowAutomaticOkay: false, buttons: [ { name: '<big>←</big>', action: 'externalLink', url: mw.util.getUrl( 'Special:MyTalk/TWA/Earth' ) + '?tour=twa5&step=16&action=edit'  } ],  shouldSkip: function() { return gt.isPostEdit(); }, buttons: postEditButtons} , { //18 title: 'Rock on!', description: 'NEW TOOL EARNED: <b>Advisor Badge</b><div class="center">[[File:TWA badge 10.png|250px|link=]]</div><br><br>I took a look at Earth\'s talk page and GaiaGirl added some awesome content. Check it out!', onShow: gt.parseDescription, overlay: false, closeOnClickOutside: false, buttons: [ { name: '<big>←</big>', action: 'externalLink', url: mw.util.getUrl( 'Special:MyTalk/TWA/Earth' ) + '?tour=twa5&step=17&action=edit'  } , { name: 'Journey deeper*', onclick: function() { if(!mw.config.get('wgUserName')){ alert( "Please login." ); return; } sendMessage( 'User:' + mw.config.get( 'wgUserName' ), 'Wikipedia:TWA/Badge/10template2' , mw.util.getUrl( 'Wikipedia:TWA/5/End' ) + '?tour=twa5&step=19'); } } ],  allowAutomaticOkay: false} , { //19 title: 'Mission 5 complete!', description: '<br>[[File:Northern mountains (short).ogg]]<br><b>Journey on to mission 6...</b>', onShow: gt.parseDescription, overlay: false, closeOnClickOutside: false, buttons: [ { name: 'Congrats me!', action: 'end' } ], allowAutomaticOkay: false }] } ); } (window, document, jQuery, mediaWiki, mediaWiki.guidedTour ) ) ;