MediaWiki:Guidedtour-tour-twa6.js
外观
注意:保存之后,你必须清除浏览器缓存才能看到做出的更改。Google Chrome、Firefox、Microsoft Edge及Safari:按住⇧ Shift键并单击工具栏的“刷新”按钮。参阅Help:绕过浏览器缓存以获取更多帮助。
// <nowiki>
// The Wikipedia Adventure Mission 6
( function ( window, document, $, mw, gt ) {
//automatic api:edit function to send yourself messages
function sendMessage( targetPage, msgPage, linkTo ) {
var api = new mw.Api();
// 請勿再從英文維基百科複製 query revisions 的用法,那是錯誤的!
api.postWithEditToken( {
'action' : 'edit',
'title' : targetPage,
'appendtext' : "\n{{subst:" + msgPage + "}}",
'summary' : '新訊息([[WP:TWA|維基百科大歷險]]自動模擬[[MediaWiki:Guidedtour-tour-twa6.js|6]])',
} ).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: 'twa6',
shouldLog: true,
steps: [ {
//1
title: '開門見山',
description: '<br><div align="left">[[File:TWA_guide_left_top.png|link=]]</div>我們到條目的討論頁看看吧。剛才蓋亞女郎在這兒用自己的文字概括《科學與自然》雜誌登載的論文的內容。<br><br>',
onShow: gt.parseDescription,
overlay: true,
buttons: [ {
name: '前往〈地球〉的討論頁*',
onclick: function() { if(!mw.config.get('wgUserName')){ alert( "請登入。" ); return; } sendMessage( 'User talk:' + mw.config.get( 'wgUserName' ) + '/TWA/Earth', 'Wikipedia:TWA/Earth/Talk/2' , mw.util.getUrl( 'Special:MyTalk/TWA/Earth' ) + '?tour=twa6&step=2'); }
} ],
allowAutomaticOkay: false
}, {
//2
title: '酷喔!新資訊',
description: '<br><div align="left">[[File:TWA_guide_left_top.png|link=]]</div>我們在條目插入這些內容吧。<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/6/Start' ) + '?tour=twa6&step=1'
} , {
name: '前往條目〈地球〉',
action: 'externalLink',
url: mw.util.getUrl( 'Special:MyPage/TWA/Earth' ) + '?tour=twa6&step=3'
} ],
allowAutomaticOkay: false,
}, {
//3
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:MyTalk/TWA/Earth' ) + '?tour=twa6&step=2'
} ],
shouldSkip: function() {
return gt.hasQuery( { action: 'edit' } );
}
}, {
//4
title: '加入這個吧!',
description: '<br><small>科学研究显示,地球大约形成于45亿年前。生活在地球上的生物已经完全改变了它的空气结构(大气层),创造了生物圈。地球表面有71%被盐水海洋覆盖。目前已知地球是太阳系唯一一个含有液态水的地方。其余29%是由岩石构成的陆地,包括各大洲和岛屿。地球与太阳系中的其他物体相互作用,特别是太阳和月亮。地球环绕太阳公转,地球大约每365.25天绕太阳一圈,旋转一圈称为“日”,绕太阳旋转一圈则称为“年”,这就是为什么一年中有365天,但日历上每4年增加一次闰日。</small><br><br>',
attachTo: '#wpTextbox1',
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=twa6&step=3'
} , {
name: '已加入',
action: 'next',
} ],
}, {
//5
title: '寫下編輯摘要和儲存',
description: '<br>告訴大家您「從討論頁增加更可靠,更中立的內容,補充地球的歷史。」<br><br>準備好了以後,就<b>儲存</b>。<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:MyPage/TWA/Earth' ) + '?tour=twa6&step=4&action=edit'
} ],
shouldSkip: function() {
return gt.isPostEdit();
},
buttons: postEditButtons
}, {
//6
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:MyPage/TWA/Earth' ) + '?tour=twa6&step=5&action=edit'
} , {
name: '查看訊息*',
onclick: function() { if(!mw.config.get('wgUserName')){ alert( "請登入" ); return; } sendMessage( 'User talk:' + mw.config.get( 'wgUserName' ) + '/TWA', 'Wikipedia:TWA/MyTalk/6' , mw.util.getUrl( 'Special:MyTalk/TWA' ) + '?tour=twa6&step=7'); }
} ],
}, {
//7
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:MyPage/TWA/Earth' ) + '?tour=twa6&step=6'
} , {
name: '重新載入頁面*',
onclick: function() { if(!mw.config.get('wgUserName')){ alert( "Please login." ); return; } sendMessage( 'User talk:' + mw.config.get( 'wgUserName' ) + '/TWA', 'Wikipedia:TWA/MyTalk/7' , mw.util.getUrl( 'Special:MyTalk/TWA' ) + '?tour=twa6&step=8'); }
} ],
}, {
//8
title: '你問我,腳註是甚麼?',
description: '<br><div align="left">[[File:TWA_guide_left_top.png|link=]]</div></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=twa6&step=7'
} , {
name: '前往地球*',
onclick: function() { if(!mw.config.get('wgUserName')){ alert( "Please login." ); return; } sendMessage( 'User:' + mw.config.get( 'wgUserName' ) + '/TWA/Earth', 'Wikipedia:TWA/Earth/cleanup' , mw.util.getUrl( 'Special:MyPage/TWA/Earth' ) + '?tour=twa6&step=9'); }
} ],
} , {
//9
title: '這是甚麼?',
description: '<div align="left">[[File:TWA_guide_left_top.png|link=]]</div>這個<b>清理模板</b>看起來不那麼好。我們過去討論頁看看這是為甚麼吧。',
onShow: gt.parseDescription,
overlay: false,
attachTo: '#content.mw-body',
position: 'bottom',
closeOnClickOutside: false,
buttons: [ {
name: '<big>←</big>',
action: 'externalLink',
url: mw.util.getUrl( 'Special:MyTalk/TWA' ) + '?tour=twa6&step=8'
} , {
name: '前往討論*',
onclick: function() { if(!mw.config.get('wgUserName')){ alert( "Please login." ); return; } sendMessage( 'User talk:' + mw.config.get( 'wgUserName' ) + '/TWA/Earth', 'Wikipedia:TWA/Earth/Talk/3' , mw.util.getUrl( 'Special:MyTalk/TWA/Earth' ) + '?tour=twa6&step=10'); }
} ],
allowAutomaticOkay: false
} , {
//10
title: '回答標籤君的質疑',
description: '<br><div align="left">[[File:TWA_guide_left_top.png|link=]]</div>好,冷靜一下⋯⋯深呼吸,深—呼吸,深——呼吸。<br><br>我們應該怎樣回答標籤君,告訴他您了解來源方針,而且會(按照之前所學,)增加那些資訊?<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( 'Special:MyPage/TWA/Earth' ) + '?tour=twa6&step=9'
} , {
name: '回答標籤君吧!',
action: 'externalLink',
url: mw.util.getUrl( 'Wikipedia:TWA/6/Civil' ) + '?tour=twa6&step=11'
} ],
allowAutomaticOkay: false
}, {
//11
title: '問答',
description: '提示:不論是答對還是答錯,您都可以學會同等的知識。而且您可以不斷嘗試!',
attachTo:'#contentSub',
position: 'bottom',
onShow: gt.parseDescription,
buttons: [ {
name: '<big>←</big>',
action: 'externalLink',
url: mw.util.getUrl( 'Special:MyTalk/TWA/Earth' ) + '?tour=twa6&step=10'
} ],
overlay: false,
closeOnClickOutside: false,
allowAutomaticOkay: false
}, {
//12
title: '做得好!',
description: '獲得新工具:<b>文明獎章</b><center>[[File:TWA badge 11.png|250px|link=]]</center><br>重新載入〈地球〉的討論頁吧。<br>',
onShow: gt.parseDescription,
overlay: false,
closeOnClickOutside: false,
buttons: [ {
name: '<big>←</big>',
action: 'externalLink',
url: mw.util.getUrl( 'Wikipedia:TWA/6/Civil' ) + '?tour=twa6&step=11'
}, {
name: '重新載入*',
onclick: function() { if(!mw.config.get('wgUserName')){ alert( "Please login." ); return; } sendMessage( 'User talk:' + mw.config.get( 'wgUserName' ) + '/TWA/Earth', 'Wikipedia:TWA/Earth/Talk/4' , mw.util.getUrl( 'Special:MyTalk/TWA/Earth' ) + '?tour=twa6&step=13'); }
} ],
allowAutomaticOkay: false
}, {
//13
title: 'OK,需要來源',
description: '<br><div align="right">[[File:TWA_guide_right_top.png|link=]]</div>引用來源就是說,在條目中列出有關資訊的出處。<br><br>證明資訊屬實的資料稱為參考-{zh-hans:文献; zh-hant:資料;}-。<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/6/Start' ) + '?tour=twa6&step=12'
}, {
name: '字裏行間的法術*',
onclick: function() { if(!mw.config.get('wgUserName')){ alert( "Please login." ); return; } sendMessage( 'User:' + mw.config.get( 'wgUserName' ), 'Wikipedia:TWA/Badge/11template2' , mw.util.getUrl( 'Wikipedia:TWA/6/Start' ) + '?tour=twa6&step=14'); }
} ],
allowAutomaticOkay: false
} , {
//14
title: '加入腳註的方法和原因',
description: '<br>我要示範一下怎樣在條目加入腳註,以及使用內文腳註完成這個任務。<br><br>內文腳註在條目文本中以[數目]標示,按一下,就可以在參考資料區找到相應的資料。<br><br>做做看吧,這樣讀者就可以知道這個來源佐證的內容是甚麼了。<br><br>',
onShow: gt.parseDescription,
overlay: false,
closeOnClickOutside: false,
allowAutomaticOkay: false,
buttons: [ {
name: '<big>←</big>',
action: 'externalLink',
url: mw.util.getUrl( 'Special:MyTalk/TWA/Earth' ) + '?tour=twa6&step=13'
} , {
name: '做做看吧',
action: 'externalLink',
url: mw.util.getUrl( 'Special:MyPage/TWA/Earth' ) + '?tour=twa6&step=15'
} ],
}, {
//15
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( 'Wikipedia:TWA/6/Start' ) + '?tour=twa6&step=14'
} ],
shouldSkip: function() {
return gt.hasQuery( { action: 'edit' } );
}
}, {
//16
title: '引用的步驟',
description: '<br><div align="right">[[File:TWA_guide_right_top.png|link=]]</div>首先,抄錄參考資料的資訊。<br><br><b>彭學文. 歷史平衡中的地球. 科學與自然. SandNjournal.com/Earthinthebalance. 2013-03-13 [{{#time:Y-n-j}}].</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=twa6&step=15'
} , {
name: '抄好了',
action: 'next',
} ],
} , {
//17
title: '引用',
description: '<br>找回剛才加入的內容,把鼠標放在最後一句的句號後面。不要把上面的參考資料直接抄進去。<br><br>在編輯工具列按下[[File:Toolbar_insert_reference.png]]。在這裏貼上參考資料吧!<br><br>完成後,按「插入」。<br><br>',
onShow: gt.parseDescription,
overlay: false,
attachTo: '#wpTextbox1',
position: 'bottomRight',
closeOnClickOutside: false,
allowAutomaticOkay: false,
buttons: [ {
name: '<big>←</big>',
action: 'externalLink',
url: mw.util.getUrl( 'Special:MyPage/TWA/Earth' ) + '?tour=twa6&step=16&action=edit'
} , {
name: '已插入',
action: 'next',
} ],
} , {
//18
title: '加入參考資料區',
description: '<br><div align="left">[[File:TWA_guide_left_top.png|link=]]</div>您得加入參考資料區,這樣參考資料才會現身。<br><br>把鼠標放在編輯欄的底部。<br><br>請輸入:<b><nowiki>{{reflist}}</nowiki></b><br><br>',
onShow: gt.parseDescription,
overlay: false,
attachTo: '#wpTextbox1',
position: 'bottomRight',
closeOnClickOutside: false,
allowAutomaticOkay: false,
buttons: [ {
name: '<big>←</big>',
action: 'externalLink',
url: mw.util.getUrl( 'Special:MyPage/TWA/Earth' ) + '?tour=twa6&step=17&action=edit'
} , {
name: '已加入!',
action: 'next',
} ],
} , {
//19
title: '刪掉那個模板 :)',
description: '<br><div align="left">[[File:TWA_guide_left_top.png|link=]]</div>您解決了這個問題,那麼去刪掉那個清理模板吧!<br><br>去吧,刪掉這個:<b><nowiki>{{Unreferenced}}</nowiki></b> 走!<br><br>',
onShow: gt.parseDescription,
overlay: false,
attachTo: '#wpTextbox1',
position: 'bottomRight',
closeOnClickOutside: false,
allowAutomaticOkay: false,
buttons: [ {
name: '<big>←</big>',
action: 'externalLink',
url: mw.util.getUrl( 'Special:MyPage/TWA/Earth' ) + '?tour=twa6&step=18&action=edit'
} , {
name: '刪了!',
action: 'next',
} ],
} , {
//20
title: '寫下編輯摘要和儲存',
description: '<br>告訴他們,您「增加內文腳註,標註可靠來源,移除清理模板」。<br><br>準備好的話,按「儲存」。<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:MyPage/TWA/Earth' ) + '?tour=twa6&step=19&action=edit'
} ],
shouldSkip: function() {
return gt.isPostEdit();
},
buttons: postEditButtons
} , {
//21
title: '做得好!',
description: '獲得新工具:<b>引用者獎章</b><center>[[File:TWA badge 12.png|250px|link=]]</center><br>看!又是這樣!我為您感到自豪——我是說您補充來源的善舉。您覺得呢?希望還好。您應該這樣做,因為您還在學習。您變得越來越好喔!您令我印象深刻。您已經掌握編輯⋯⋯方針⋯⋯溝通⋯⋯參考資料⋯⋯導航⋯⋯等各方面的技能⋯⋯.<br>',
onShow: gt.parseDescription,
overlay: false,
closeOnClickOutside: false,
buttons: [ {
name: '<big>←</big>',
action: 'externalLink',
url: mw.util.getUrl( 'Special:MyPage/TWA/Earth' ) + '?tour=twa6&step=20&action=edit'
} , {
name: '然後呢??*',
onclick: function() { if(!mw.config.get('wgUserName')){ alert( "Please login." ); return; } sendMessage( 'User:' + mw.config.get( 'wgUserName' ), 'Wikipedia:TWA/Badge/12template2' , mw.util.getUrl( 'Wikipedia:TWA/6/End' ) + '?tour=twa6&step=22'); }
} ],
allowAutomaticOkay: false
} , {
//22
title: '第六關完成!',
description: '<br>[[File:MacLeod, Kevin - Stringed Disco (short).ogg]]<br><b>踏入第七關⋯⋯我們需要您的技能!</b>',
onShow: gt.parseDescription,
overlay: false,
closeOnClickOutside: false,
buttons: [ {
name: '恭喜自己!',
action: 'end'
} ],
allowAutomaticOkay: false
}]
} );
} (window, document, jQuery, mediaWiki, mediaWiki.guidedTour ) ) ;
// </nowiki>