Thành viên:Nvdtn19/Guidedtour-tour-twa4.js
Giao diện
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 Explorer và Safari: 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 4 ( 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' : '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', onclick: function() { window.location.href = window.location.href +"&veaction=edit"; } } );}gt.defineTour( { name: 'twa4', shouldLog: true, steps: [ { //1 title: 'Welcome back! ', description: '<br><div align="left">[[File:TWA_guide_left_top.png|link=]]</div>We left off with a new message from GaiaGirl that she added some content to the article. Let\'s see what\'s new.<br><br>', overlay: true, onShow: gt.parseDescription, buttons: [ { name: 'Get back to Earth?*', onclick: function() { if(!mw.config.get('wgUserName')){ alert( "Please login." ); return; } sendMessage( 'User:' + mw.config.get( 'wgUserName' ) + '/TWA/Earth', 'Wikipedia:TWA/Earth/2' , mw.util.getUrl( 'Special:MyPage/TWA/Earth' ) + '?tour=twa4&step=2'); } } ], allowAutomaticOkay: false }, { //2 title: 'What\'s new?', description: '<br><div align="left">[[File:TWA_guide_left_top.png|link=]]</div>An easy way to see what\'s changed since you were last here is to use the article\'s HISTORY.<br><br>The history is like a watchlist of all the activity that happens at a single page.<br><br> Every change that\'s ever been made to an article lives there. Neat, huh?<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( 'Wikipedia:TWA/4/Start' ) + '?tour=twa4&step=1' } , { name: 'Become a Wiki-Historian', action: 'externalLink', url: mw.util.getUrl( 'Wikipedia:TWA/Earth/History/1' ) + '?tour=twa4&step=3' } ], allowAutomaticOkay: false }, { //3 title: 'This looks familiar!', description: '<br><div align="right">[[File:TWA_guide_right_top.png|link=]]</div>Each line is a change—the time it was made, how much info was added or taken away, and what happened in the edit summary. This is why edit summaries are so cool!<br><br>', 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=twa4&step=2' } , { name: 'Master the tool', action: 'next' } ], }, { //4 title: 'Compare to the previous version', description: '<br><div align="right">[[File:TWA_guide_left_top.png|link=]]</div>If you wanted to compare a version to the one that came right before it, you could click the prev link in that line. (This page\'s prev links are disabled for galactic safety).<br><br>', 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( 'Wikipedia:TWA/Earth/History/1' ) + '?tour=twa4&step=3' } , { name: 'Another trick', action: 'next' } ], }, { //5 title: 'Compare between two distant versions', description: '<br><div align="left">[[File:TWA_guide_left_top.png|link=]]</div>You can also compare two distant versions, which sometimes comes in handy, when you\'re tracking changes over a longer period of time.<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/Earth/History/1' ) + '?tour=twa4&step=4' } , { name: 'What\'s new?', action: 'next' } ], allowAutomaticOkay: false,}, { //6 title: 'Diff, what?', description: '<br><div align="left">[[File:TWA_guide_left_top.png|link=]]</div>We call a comparison between any two versions a DIFF, as in <i>difference</i><br><br>', onShow: gt.parseDescription, attachTo: '#footer-info-copyright', position: 'bottom', overlay: false, closeOnClickOutside: false, buttons: [ { name: '<big>←</big>', action: 'externalLink', url: mw.util.getUrl( 'Wikipedia:TWA/Earth/History/1' ) + '?tour=twa4&step=5' } , { name: 'See the DIFF of GaiaGirl\'s most recent edit', action: 'externalLink', url: mw.util.getUrl( 'Wikipedia:TWA/Earth/4/Diff' ) + '?tour=twa4&step=7' } ], allowAutomaticOkay: false } , { //7 title: 'See what changed', description: '<br>The old version is on the left. The new version is on the right. The changes are highlighted.<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/Earth/History/1' ) + '?tour=twa4&step=6' } , { name: 'What do you think?', action: 'externalLink', url: mw.util.getUrl( 'Special:MyPage/TWA/Earth' ) + '?tour=twa4&step=8' } ], allowAutomaticOkay: false } , { //8 title: 'Well, that\'s pretty biased...', description: '<br><div align="left">[[File:TWA_guide_left_top.png|link=]]</div>Ok, it looks like GaiaGirl added some information that might be biased.<br><br>How do we make choices about how to present information? <br><br>Wikipedia editors rely on an idea called the <b>Neutral Point of View</b>.<br><br>', onShow: gt.parseDescription, overlay: false, closeOnClickOutside: false, allowAutomaticOkay: false, buttons: [ { name: '<big>←</big>', action: 'externalLink', url: mw.util.getUrl( 'Wikipedia:TWA/Earth/4/Diff' ) + '?tour=twa4&step=7' } , { name: 'Get to the [neutral] point', action: 'next', } ],} , { //9 title: 'NPOV', description: '<br><div align="left">[[File:TWA_guide_left_top.png|link=]]</div>The neutral point of view, also called <b>NPOV</b> for short, is the idea that Wikipedia does not have its own opinions or rely on the opinions of its editors.<br><br>Instead, we summarize what good sources have already written about a subject and do that in a balanced way.<br><br>', onShow: gt.parseDescription, overlay: true, closeOnClickOutside: false, buttons: [ { name: '<big>←</big>', action: 'externalLink', url: mw.util.getUrl( 'Special:MyPage/TWA/Earth' ) + '?tour=twa4&step=8' } , { name: 'Read the policy.', action: 'externalLink', url: mw.util.getUrl( 'Wikipedia:TWA/4/Start' ) + '?tour=twa4&step=10' } ], allowAutomaticOkay: false} , { //10 title: 'Policies are practices we practice', description: '<br><div align="right">[[File:TWA_guide_right_top.png|link=]]</div>Policies describe community practices. There\'s pretty much a policy for every situation you could imagine, but a few are extra important.<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=twa4&step=9' } , { name: 'NPOV policy', action: 'next', } ], }, { //11 title: 'The NPOV policy', description: '<br><b>Articles must not take sides, but should explain the sides, fairly and without bias. This applies to both what you say and how you say it.</b><br><br>Give this a good, deep brain inhale. Let it soak into your cortexes.<br><br>', onShow: gt.parseDescription, overlay: false, closeOnClickOutside: false, buttons: [ { name: '<big>←</big>', action: 'externalLink', url: mw.util.getUrl( 'Wikipedia:TWA/4/Start' ) + '?tour=twa4&step=10' } , { name: 'Think you got it?', action: 'externalLink', url: mw.util.getUrl( 'Wikipedia:TWA/4/NPOV' ) + '?tour=twa4&step=12' } ], allowAutomaticOkay: false } , { //12 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/4/Start' ) + '?tour=twa4&step=11' } ],} , { //13 title: 'Rock on!', description: 'NEW TOOL EARNED: <b>Neutrality Badge</b><div class="center">[[File:TWA badge 5.png|250px|link=]]</div><br>', onShow: gt.parseDescription, overlay: false, closeOnClickOutside: false, allowAutomaticOkay: false, buttons: [ { name: '<big>←</big>', action: 'externalLink', url: mw.util.getUrl( 'Wikipedia:TWA/4/NPOV' ) + '?tour=twa4&step=12' }, { name: 'Journey on*', onclick: function() { if(!mw.config.get('wgUserName')){ alert( "Please login." ); return; } sendMessage( 'User:' + mw.config.get( 'wgUserName' ), 'Wikipedia:TWA/Badge/5template2' , mw.util.getUrl( 'Special:MyPage/TWA/Earth' ) + '?tour=twa4&step=14'); } } ],} , { //14 title: 'Put NPOV to work', description: '<br><div align="left">[[File:TWA_guide_left_top.png|link=]]</div>Let\'s take another look at those changes to Earth.<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( 'Wikipedia:TWA/4/Start' ) + '?tour=twa4&step=13' } , { name: 'Do you see any problems?', action: 'externalLink', url: mw.util.getUrl( 'Special:MyPage/TWA/Earth' ) + '?tour=twa4&step=15' } ],} , { //15 title: 'Removing Bias', description: '<br><div align="left">[[File:TWA_guide_left_top.png|link=]]</div><strong>Earth is the best and coolest planet in the whole galaxy. Earth is a place that\'s perfect for humans to live.</strong><br><br>Those additions are trying to say something relevant but they\'re not balanced. They\'re not neutral. They sound like the writer\'s opinion.<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:MyPage/TWA/Earth' ) + '?tour=twa4&step=14' } , { name: 'Say it better', action: 'externalLink', url: mw.util.getUrl( 'Wikipedia:TWA/4/Rephrase' ) + '?tour=twa4&step=16' } ], } , { //16 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:MyPage/TWA/Earth' ) + '?tour=twa4&step=15' } ], }, { //17 title: 'Time for a rephrase', description: '<br>Click EDIT SOURCE to rephrase the text<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/4/Rephrase' ) + '?tour=twa4&step=16' }], shouldSkip: function() { return gt.hasQuery( { action: 'edit' } ); } }, { //18 title: 'Fix and replace', description: '<br><div align="right">[[File:TWA_guide_right_top.png|link=]]</div>Copy the neutral text and paste it to replace the biased text:<br><br><b>Earth is the only planet in the galaxy which is known to support life. Earth has many places that are suitable for humans to live; although, some areas of the planet can be dangerous for humans or uninhabitable.</b><br><br>', 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=twa4&step=17' } , { name: 'Done', action: 'next' } ], }, { //19 title: 'Edit summary, and Publish', description: '<br>Let them know that you, "Changed text to be more neutral and unbiased".<br><br>Then PUBLISH when you\'re ready.', attachTo: '#wpSave', position: 'bottomRight', onShow: gt.parseDescription, overlay: false, closeOnClickOutside: false, allowAutomaticOkay: false, buttons: [ { name: '<big>←</big>', action: 'externalLink', url: mw.util.getUrl( 'Special:MyPage/TWA/Earth' ) + '?tour=twa4&step=18&action=edit' } ], shouldSkip: function() { return gt.isPostEdit(); }, buttons: postEditButtons }, { //20 title: 'Helpin\' out!', description: 'NEW TOOL EARNED: Collaborator Badge <div class="center">[[File:TWA badge 6.png|250px|link=]]</div><br>', onShow: gt.parseDescription, overlay: false, closeOnClickOutside: false, buttons: [ { name: '<big>←</big>', action: 'externalLink', url: mw.util.getUrl( 'Special:MyPage/TWA/Earth' ) + '?tour=twa4&step=19&action=edit' } , { name: 'Keep on helping*', onclick: function() { if(!mw.config.get('wgUserName')){ alert( "Please login." ); return; } sendMessage( 'User:' + mw.config.get( 'wgUserName' ), 'Wikipedia:TWA/Badge/6template2' , mw.util.getUrl( 'Wikipedia:TWA/4/Start' ) + '?tour=twa4&step=21'); } } ], allowAutomaticOkay: false }, { //21 title: 'That was great', description: '<br><div align="left">[[File:TWA_guide_left_top.png|link=]]</div>It\'s important that Wikipedia read like a real encyclopedia and not any editor\'s personal blog.<br><br>We\'re all here to share information in a way that is balanced.<br><br>That process can be challenging, but we are united in the goal of sharing knowledge.<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=twa4&step=20' } , { name: 'All Hail NPOV', action: 'externalLink', url: mw.util.getUrl( 'Wikipedia:TWA/4/Start' ) + '?tour=twa4&step=22' } ], } , { //22 title: 'Ooh, a new message!', description: '<br><div align="left">[[File:TWA_guide_left_top.png|link=]]</div>Check it out.</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=twa4&step=21' } , { name: 'Check your talk page*', onclick: function() { if(!mw.config.get('wgUserName')){ alert( "Please login." ); return; } sendMessage( 'User talk:' + mw.config.get( 'wgUserName' ) + '/TWA', 'Wikipedia:TWA/MyTalk/4' , mw.util.getUrl( 'Special:MyTalk/TWA' ) + '?tour=twa4&step=23'); } } ], } , { //23 title: 'Interesting question...', description: '<div align="right">[[File:TWA_guide_right_top.png|link=]]</div>What does it mean?', 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:MyPage/TWA/Earth' ) + '?tour=twa4&step=22' } , { name: 'Pierce the veil of Verifiability', action: 'externalLink', url: mw.util.getUrl( 'Wikipedia:TWA/4/End' ) + '?tour=twa4&step=24' } ],} , { //24 title: 'Mission 4 complete!', description: '<br>[[File:02 Taiko2.ogg (short).ogg]]<br><b>Journey on to mission 5...</b>', onShow: gt.parseDescription, overlay: false, closeOnClickOutside: false, buttons: [ { name: 'Congrats me!', action: 'end' } ], allowAutomaticOkay: false}] } ); } (window, document, jQuery, mediaWiki, mediaWiki.guidedTour ) ) ;