User:Cdip150/工具/介面/MacauEditTool.js

注意:保存之后,你必须清除浏览器缓存才能看到做出的更改。Google ChromeFirefoxMicrosoft EdgeSafari:按住⇧ Shift键并单击工具栏的“刷新”按钮。参阅Help:绕过浏览器缓存以获取更多帮助。

/*
   本介面工具是「澳門條目專用的編輯工具」
   如欲修改或有意見請先前往User_talk:Cdip150洽詢
*/

// 參考資料及註釋預設文字
function getRefText(){
 return "\n\n==參考資料及註釋==\n<div class=\"references-small\">\n<references />\n</div>\n\n==外部連結==\n<div class=\"references-small\">\n*[http:// 連接1]\n*[http:// 連接2]\n</div>\n\n==相關條目==\n*[[條目1]]\n*[[條目2]]\n\n";
}

// 澳門條目編輯下拉選單
addDropdownMenu("MacauArticleEdit",'澳門條目編輯',[
 {
  id         : "ViewWikiMacauSrc",
  text       : "-----站內檢視-----",
  tagOpen    : "" ,
  sampleText : "" ,
  tagClose   : ""
 },
 {
  id         : "MacauCategoryTree",
  text       : "澳門分類樹",
  tagOpen    : "" ,
  sampleText : "" ,
  tagClose   : "" ,
  action     : function(){
   if(!window.winMacauCategory){
    window.winMacauCategory=new Object();
    window.winMacauCategory.closed=true;
   }

   if(window.winMacauCategory.closed){
    window.winMacauCategory=window.open("http://zh.wikipedia.org/wiki/Special:CategoryTree/%E6%BE%B3%E9%96%80", "", "width=400,height=400,resizable=yes,menubar=no,toolbar=no,status=yes,location=no,fullscreen=no,scrollbars=yes");
   }else{
    window.winMacauCategory.focus();
   }
  }

 },
 {
  id         : "MacauCommonsCategory",
  text       : "澳門維基共享資源",
  tagOpen    : "" ,
  sampleText : "" ,
  tagClose   : "" ,
  action     : function(){
   if(!window.winMacauCommons){
    window.winMacauCommons=new Object();
    window.winMacauCommons.closed=true;
   }

   if(window.winMacauCommons.closed){
    window.winMacauCommons=window.open("http://commons.wikimedia.org/wiki/Category:Macau", "", "width=800,height=600,resizable=yes,menubar=no,toolbar=no,status=yes,location=no,fullscreen=no,scrollbars=yes");
   }else{
    window.winMacauCommons.focus();
   }
  }

 },
 {
  id         : "OftenUsedMacauTemplate",
  text       : "-----常用模板-----",
  tagOpen    : "" ,
  sampleText : "" ,
  tagClose   : ""
 },
 { 
  id         : "ptTextLangCode",
  text       : "葡語標明",
  tagOpen    : "{\{lang|pt|" ,
  sampleText : "葡萄牙文" ,
  tagClose   : "}\}"
 },
 { 
  id         : "MacauStub",
  text       : "澳門小作品標籤",
  tagOpen    : "{\{MO-stub}\}" ,
  sampleText : "" ,
  tagClose   : ""
 },
 {
  id         : "NewMacauArticlesFormat",
  text       : "-----新條目基本格式-----",
  tagOpen    : "" ,
  sampleText : "" ,
  tagClose   : ""
 },
 {
  id         : "MacauStreetSample",
  text       : "澳門街道",
  tagOpen    : "\'\'\'" ,
  sampleText : "街道名稱" ,
  tagClose   : "\'\'\'([[葡萄牙文]]:\'\'\'{\{lang|pt|葡文名稱}\}\'\'\')位於......\n\n==歷史沿革==\n...\n\n==段落1==\n\n==段落2==\n\n==沿途地點==\n"+getRefText()+"[["+"Category:澳門街道]]"
 },
 {
  id         : "MacauEventSample",
  text       : "澳門事件",
  tagOpen    : "\'\'\'" ,
  sampleText : "事件名稱" ,
  tagClose   : "\'\'\'發生於......\n\n==背景==\n...\n\n==起因==\n...\n\n==事件經過==\n...\n\n==事件表態==\n...\n\n==後續==\n..."+getRefText()+"[["+"Category:澳門歷史]]"
 },
 {
  id         : "RefMacauData",
  text       : "-----列明來源-----",
  tagOpen    : "" ,
  sampleText : "" ,
  tagClose   : ""
 },
 {
  id         : "RefMacauGovCommunique",
  text       : "政府公報",
  tagOpen    : "<ref name=\"\">{{cite journal|journal=澳門政府公報\n|location=澳門\n|publisher=印務局\n|date=yyyy年M月d日\n|issue=yyyy年第n期第x組\n|title=" ,
  sampleText : "章節名稱" ,
  tagClose   : "|url=\n}\}</ref>"
 },
 {
  id         : "RefMacaodaily",
  text       : "澳門日報",
  tagOpen    : "<ref name=\"\">{\{cite news|publisher=澳門日報\n|date=yyyy年M月d日\n|title=" ,
  sampleText : "報道標題名稱" ,
  tagClose   : "\n|pages=\n}\}</ref>"
 },
 {
  id         : "RefVakio",
  text       : "華僑報",
  tagOpen    : "<ref name=\"\">{\{cite news|publisher=華僑報\n|location=澳門\n|date=yyyy年M月d日\n|title=" ,
  sampleText : "報道標題名稱" ,
  tagClose   : "\n|pages=\n}\}</ref>"
 },
 {
  id         : "RefTaiChong",
  text       : "大眾報",
  tagOpen    : "<ref name=\"\">{\{cite news|publisher=大眾報\n|location=澳門\n|date=yyyy年M月d日\n|title=" ,
  sampleText : "報道標題名稱" ,
  tagClose   : "|pages=\n}\}</ref>"
 },
 {
  id         : "RefTDM1900News",
  text       : "澳視新聞(19:00)",
  tagOpen    : "<ref name=\"\">{\{cite episode|network=澳廣視\n|station=澳視澳門台\n|series=澳視新聞\n|airdate=yyyy年M月d日 19:00(UTC+8)\n|title=" ,
  sampleText : "報道標題名稱" ,
  tagClose   : "}\}</ref>"
 },
 {
  id         : "RefTDMCurrentNews",
  text       : "澳廣視即時新聞",
  tagOpen    : "<ref name=\"\">{\{cite news|publisher=澳廣視\n|work=即時新聞\n|date=yyyy年M月d日 hh:mm(UTC+8)\n|title=" ,
  sampleText : "報道標題名稱" ,
  tagClose   : "\n|url=\n}\}</ref>"
 },
 {
  id         : "RefMacauPedia",
  text       : "澳門百科全書",
  tagOpen    : "<ref name=\"\">{\{cite book|title=《澳門百科全書》\n|url=http://www.macaudata.com/macaubook/encyclopedia/index.html\n|editor=吳志良、楊允中\n|date=1999年11月\n|publisher=澳門基金會\n|isbn=972-658-078-1\n|chapter=" ,
  sampleText : "章節名稱" ,
  tagClose   : "|chapterurl=\n}\}</ref>"
 },
 {
  id         : "RefMacauPedia2005",
  text       : "澳門百科全書2005年版",
  tagOpen    : "<ref name=\"\">{\{cite book|title={{PDF|[http://www.macaudata.com/upload_files/pdf/817.pdf 《澳門百科全書》]}}\n|editor=吳志良、楊允中\n|date=2005年|edition=修訂版\n|publisher=[[澳門基金會]]\n|isbn=99937-1-032-6\n|chapter=" ,
  sampleText : "章節名稱" ,
  tagClose   : "|pages=\n}\}</ref>"
 },
 {
  id         : "RefMacauHistoryFacts",
  text       : "澳門掌故",
  tagOpen    : "<ref name=\"\">{\{cite book|title=《澳門掌故》\n|author=王文達\n|origdate=1950年代|edition=1999年整理版\n|publisher=中華教育會《澳門教育》出版社\n|isbn=972-97840-1-9\n|chapter=" ,
  sampleText : "章節名稱" ,
  tagClose   : "|pages=\n}\}</ref>"
 },
 {
  id         : "RefMacauLandscapes",
  text       : "澳門風物誌",
  tagOpen    : "<ref name=\"\">{\{cite book|title=《澳門風物誌》\n|author=唐思\n|origdate=1994年8月\n|edition=1998年4月北京第1版\n|url=http://www.macaudata.com/macaubook/book141/index.html\n|isbn=7-5057-1421-X/C.127\n|series=九九澳門回家書系\n|publisher=中國友誼出版公司\n|chapter=" ,
  sampleText : "章節名稱" ,
  tagClose   : "|chapterurl=\n}\}</ref>"
 },
 {
  id         : "RefMacauLandscapesCont",
  text       : "澳門風物誌(續篇)",
  tagOpen    : "<ref name=\"\">{\{cite book|title=《澳門風物誌》續篇\n|url=http://www.macaudata.com/macaubook/macauserial/amfwz/index.html\n|author=唐思\n|date=1999年11月\n|series=澳門文學叢書\n|publisher=中國文聯出版社\n|isbn=7-5059-3503-8\n|chapter=" ,
  sampleText : "章節名稱" ,
  tagClose   : "|chapterurl=\n}\}</ref>"
 },
 {
  id         : "RefMacauLandscapes3",
  text       : "澳門風物誌Ⅲ",
  tagOpen    : "<ref name=\"\">{\{cite book|title={\{PDF|[http://www.macaudata.com/upload_files/pdf/744.pdf 《澳門風物誌》第三集]}\}\n|author=唐思\n|date=2004年4月\n|publisher=澳門基金會\n|isbn=99937-1-027-X\n|chapter=" ,
  sampleText : "章節名稱" ,
  tagClose   : "\n}\}</ref>"
 },
 {
  id         : "RefMacauStreetList1993",
  text       : "澳門市街名冊1993",
  tagOpen    : "<ref name=\"\">{\{cite book|title=《澳門市街道及其它地方名冊》\n|edition=1993年版\n|publisher=澳門市政廳\n|chapter=(第一部份) 公共街道\n|pages=第" ,
  sampleText : "x" ,
  tagClose   : "頁\n}\}</ref>"
 },
 {
  id         : "RefMacauAllBusiness",
  text       : "澳門百業",
  tagOpen    : "<ref name=\"\">{\{cite book|title=《澳門百業》\n|url=http://www.macaudata.com/macaubook/book092/index.html\n|editor=陳子良\n|origdate=1996年12月|edition=1998年6月修訂版\n|publisher=[[澳門培正中學]]史地學會\n|chapter=" ,
  sampleText : "章節名稱" ,
  tagClose   : "|chapterurl=\n}\}</ref>"
 }
]);