User:Ou0430/Friendly/friendlytag.min.js

维基新闻,自由的新闻源

注意:在发布之后,您可能需要清除浏览器缓存才能看到所作出的变更的影响。

  • Firefox或Safari:按住Shift的同时单击刷新,或按Ctrl-F5Ctrl-R(Mac为⌘-R
  • Google Chrome:Ctrl-Shift-R(Mac为⌘-Shift-R
  • Internet Explorer或Edge:按住Ctrl的同时单击刷新,或按Ctrl-F5
  • Opera:Ctrl-F5
if(typeof(FriendlyConfig)=='undefined'){FriendlyConfig={};}
if(typeof(FriendlyConfig.summaryAd)=='undefined'){FriendlyConfig.summaryAd=" using [[WP:FRIENDLY|Friendly]]";}
if(typeof(FriendlyConfig.groupByDefault)=='undefined'){FriendlyConfig.groupByDefault=true;}
if(typeof(FriendlyConfig.watchTaggedPages)=='undefined'){FriendlyConfig.watchTaggedPages=false;}
if(typeof(FriendlyConfig.markTaggedPagesAsMinor)=='undefined'){FriendlyConfig.markTaggedPagesAsMinor=true;}
if(typeof(FriendlyConfig.markTaggedPagesAsPatrolled)=='undefined'){FriendlyConfig.markTaggedPagesAsPatrolled=true;}
var isRedirect;function friendlytag(){isRedirect=function(){var allPageTags=document.getElementsByTagName("*");for(i=0;i<allPageTags.length;i++){if(allPageTags[i].className=='redirectText'){return true;}}
return false;}();if(isRedirect){twAddPortletLink("javascript:friendlytag.callback()",wgULS("標記","標記"),"friendly-tag",wgULS("標記重定向","標記重定向"),"");}else if(wgNamespaceNumber!=0||wgCurRevisionId==false){return;}else{twAddPortletLink("javascript:friendlytag.callback()",wgULS("標記","標記"),"friendly-tag",wgULS("標記條目","標記條目"),"");}}
addOnloadHook(friendlytag);friendlytag.callback=function friendlytagCallback(uid){var Window=new SimpleWindow(600,400);var form=new QuickForm(friendlytag.callback.evaluate);if(!isRedirect){Window.setTitle("條目維護標記");form.append({type:'checkbox',list:[{label:'如可能,合併到{{article issues}}',value:'group',name:'group',checked:FriendlyConfig.groupByDefault}]});form.append({type:'submit'});form.append({type:'header',label:'維護模板'});form.append({type:'checkbox',name:'maintenance',list:friendlytag.maintenanceList});form.append({type:'header',label:'問題模板'});form.append({type:'checkbox',name:'problem',list:friendlytag.problemList});form.append({type:'header',label:'通知模板'});form.append({type:'checkbox',name:'notice',list:friendlytag.noticeList});if(typeof(FriendlyConfig.customTagList)=='object'){form.append({type:'header',label:'自定義模板'});form.append({type:'checkbox',name:'custom',list:FriendlyConfig.customTagList});}}else{Window.setTitle("重定向維護標記");form.append({type:'submit'});form.append({type:'header',label:'常用模板'});form.append({type:'checkbox',name:'commonredir',list:friendlytag.commonredirList});form.append({type:'header',label:'偶用模板'});form.append({type:'checkbox',name:'rareredir',list:friendlytag.rareredirList});form.append({type:'header',label:'鮮用模板'});form.append({type:'checkbox',name:'littleredir',list:friendlytag.littleredirList});}
form.append({type:'submit'});var result=form.render();Window.setContent(result);Window.display();}
friendlytag.maintenanceList=[{label:wgULS("\{\{attention\}\}: 此條目需要您的關注","\{\{attention\}\}: 此條目需要您的關注"),value:'attention'},{label:wgULS("\{\{cleanup\}\}: 條目可能需要進行清理","\{\{cleanup\}\}: 條目可能需要進行清理"),value:'cleanup'},{label:wgULS("\{\{copyedit\}\}: 條目需要校對,以確保語法、用語、語氣、風格及表達恰當","\{\{copyedit\}\}: 條目需要校對,以確保語法、用語、語氣、風格及表達恰當"),value:'copyedit'},{label:wgULS("\{\{expand\}\}: 此條目需要擴充","\{\{expand\}\}: 此條目需要擴充"),value:'expand'},{label:wgULS("\{\{expert\}\}: 此條目需要精通或熟悉本主題的專家參與編輯","\{\{expert\}\}: 此條目需要精通或熟悉本主題的專家參與編輯"),value:'expert'},{label:wgULS("\{\{fansite\}\}: 此條目類似愛好者站點","\{\{fansite\}\}: 此條目類似愛好者站點"),value:'fansite'},{label:wgULS("\{\{grammar\}\}: 此條目或章節的文法需要改善","\{\{grammar\}\}: 此條目或章節的文法需要改善"),value:'grammar'},{label:wgULS("\{\{howto\}\}: 此條目或章節包含指南或教學內容","\{\{howto\}\}: 此條目或章節包含指南或教學內容"),value:'howto'},{label:wgULS("\{\{in-universe\}\}: 本條目以小說作品原始的寫作風格敘述一個小說作品或情節","\{\{in-universe\}\}: 本條目以小說作品原始的寫作風格敘述一個小說作品或情節"),value:'in-universe'},{label:wgULS("\{\{infoboxneeded\}\}: 此條目需要加上一個合適的信息框模板,或是現有的信息框需要更新","\{\{infoboxneeded\}\}: 此條目需要加上一個合適的訊息框模板,或是現有的訊息框需要更新"),value:'infoboxneeded'},{label:wgULS("\{\{intro-missing\}\}: 這個條目的導言過於短小","\{\{intro-missing\}\}: 這個條目的導言過於短小"),value:'intromissing'},{label:wgULS("\{\{newsrelease\}\}: 本條目或章節閱讀起來像是新聞稿,或包含過度的宣傳性語調","\{\{newsrelease\}\}: 本條目或章節閱讀起來像是新聞稿,或包含過度的宣傳性語調"),value:'newsrelease'},{label:wgULS("\{\{nofootnotes\}\}: 本條目包含了一些參考來源或外部鏈接,但由於條目內部缺少內文腳注,本條目的來源仍然不明確","\{\{nofootnotes\}\}: 本條目包含了一些參考來源或外部鏈結,但由於條目內部缺乏內文腳注,本條目的來源仍然不明確"),value:'nofootnotes'},{label:wgULS("\{\{notchinese\}\}: 此條目包含過多不是現代標準漢語的內容","\{\{notchinese\}\}: 此條目包含過多不是現代標準漢語的內容"),value:'notchinese'},{label:wgULS("\{\{notchinesetitle\}\}: 據命名常規,本條目標題應使用中文","\{\{notchinesetitle\}\}: 據命名常規,本條目標題應使用中文"),value:'notchinesetitle'},{label:wgULS("\{\{orphan\}\}: 這個條目只有或沒有很少鏈入頁面","\{\{orphan\}\}: 這個條目只有或沒有很少鏈入頁面"),value:'orphan'},{label:wgULS("\{\{prosetimeline\}\}: 此條目或章節可能包含不適當的條列式年代表","\{\{prosetimeline\}\}: 此條目或章節可能包含不適當的條列式年代表"),value:'prosetimeline'},{label:wgULS("\{\{roughtranslation\}\}: 此條目或章節翻譯粗劣","\{\{roughtranslation\}\}: 此條目或章節翻譯粗劣"),value:'roughtranslation'},{label:wgULS("\{\{tone\}\}: 此條目的語調或風格可能不適合百科全書的寫作方式","\{\{tone\}\}: 此條目的語調或風格可能不適合百科全書的寫作方式"),value:'tone'},{label:wgULS("\{\{translating\}\}: 此條目仍有文字未被翻譯成中文","\{\{translating\}\}: 此條目仍有文字未被翻譯成中文"),value:'translating'},{label:wgULS("\{\{trivia\}\}: 應避免有陳列雜項資料的章節","\{\{trivia\}\}: 應避免有陳列雜項資料的章節"),value:'trivia'},{label:wgULS("\{\{uncategorized\}\}: 此條目缺少頁面分類","\{\{uncategorized\}: 此條目缺乏頁面分類"),value:'uncategorized'},{label:wgULS("\{\{verylong\}\}: 此條目可能過於冗長","\{\{verylong\}\}: 此條目可能過於冗長"),value:'verylong'},{label:wgULS("\{\{wikify\}\}: 此條目格式需要被修正以符合維基標準","\{\{wikify\}\}: 此條目格式需要被修正以符合維基標準"),value:'wikify'}];friendlytag.problemList=[{label:wgULS("\{\{advert\}\}: 此條目類似廣告","\{\{advert\}\}: 此條目類似廣告"),value:'advert'},{label:wgULS("\{\{blpdispute\}\}: 此條目可能違反了生者傳記方針","\{\{blpdispute\}\}: 此條目可能違反了生者傳記方針"),value:'blpdispute'},{label:wgULS("\{\{blpsource\}\}: 此傳記條目需要補充性的引用以供查證","\{\{blpsource\}\}: 此傳記條目需要附加來源資料以供查證"),value:'blpsource'},{label:wgULS("\{\{disputed\}\}: 此條目的準確性有爭議","\{\{disputed\}\}: 此條目的準確性有爭議"),value:'disputed'},{label:wgULS("\{\{globalize\}\}: 此條目僅具一部分地域的觀點或資料,尚需補充世界性的內容","\{\{globalize\}\}: 此條目僅具一部份地域的觀點或資料,尚需補充世界性的內容"),value:'globalize',},{label:wgULS("\{\{hoax\}\}: 此條目真實性成疑","\{\{hoax\}\}: 此條目真實性成疑"),value:'hoax'},{label:wgULS("\{\{non-free\}\}: 此條目可能過多或不當地使用了受版權保護的文字、圖像或/及多媒體文件","\{\{non-free\}\}: 此條目可能過多或不當地使用了受版權保護的文字、圖像或/及多媒體檔案"),value:'non-free'},{label:wgULS("\{\{notability\}\}: 此條目可能不符合通用關注度指引","\{\{notability\}\}: 此條目可能不符合通用關注度指引"),value:'notability',subgroup:{name:'notability',type:'select',list:[{label:wgULS("\{\{notability\}\}: 通用的知名度標準","\{\{notability\}\}: 通用的知名度標準"),value:"none"},{label:wgULS("\{\{notability|Biographies\}\}: 人物傳記","\{\{notability|Biographies\}\}: 人物傳記"),value:"Biographies"},{label:wgULS("\{\{notability|Fiction\}\}: 虛構事物","\{\{notability|Fiction\}\}: 虛構事物"),value:"Fiction"},{label:wgULS("\{\{notability|Neologisms\}\}: 發明、研究","\{\{notability|Neologisms\}\}: 發明或研究"),value:"Neologisms"},{label:wgULS("\{\{notability|Web\}\}: 網站、網絡內容","\{\{notability|Web\}\}: 網站或網絡內容"),value:"Web"}]}},{label:wgULS("\{\{notability unreferenced\}\}: 此條目也許具備關注度,但需要可靠的來源來加以彰顯","\{\{notability unreferenced\}\}: 此條目也許具備關注度,但需要可靠的來源加以彰顯"),value:'notability unreferenced'},{label:wgULS("\{\{npov\}\}: 此條目的中立性有爭議。內容、語調可能帶有明顯的個人觀點或地方色彩","\{\{npov\}\}: 此條目的中立性有爭議。內容、語調可能帶有明顯的個人觀點或地方色彩"),value:'npov'},{label:wgULS("\{\{off-topic\}\}: 這篇文章的內容文不對題","\{\{off-topic\}\}: 這篇文章的內容文不對題"),value:'off-topic'},{label:wgULS("\{\{original research\}\}: 此條目可能包含原創研究或未查證內容","\{\{original research\}\}: 此條目可能包含原創研究或未查證內容"),value:'original research'},{label:wgULS("\{\{primarysources\}\}: 此條目需要可靠、公開、第三方的來源","\{\{primarysources\}\}: 此條目需要可靠、公開、第三方的來源"),value:'primarysources'},{label:wgULS("\{\{refimprove\}\}: 此條目需要補充更多來源","\{\{refimprove\}\}: 此條目需要補充更多來源"),value:'refimprove'},{label:wgULS("\{\{review\}\}: 此條目或章節閱讀起來類似評論","\{\{review\}\}: 此條目或章節閱讀起來類似評論"),value:'review'},{label:wgULS("\{\{rewrite\}\}: 此條目或段落的質量低劣,需要完全重寫","\{\{rewrite\}\}: 此條目或段落的質量低劣,需要完全重寫"),value:'rewrite'},{label:wgULS("\{\{substub\}\}: 這篇是過於短小的文章","\{\{substub\}\}: 這篇是過於短小的文章"),value:'substub'},{label:wgULS("\{\{unencyclopedic\}\}: 此條目可能不適合寫入百科全書","\{\{unencyclopedic\}\}: 此條目可能不適合寫入百科全書"),value:'unencyclopedic'},{label:wgULS("\{\{unreferenced\}\}: 此條目沒有列出任何參考或來源","\{\{unreferenced\}\}: 此條目沒有列出任何參考或來源"),value:'unreferenced'},{label:wgULS("\{\{update\}\}: 這個條目需要更新","\{\{update\}\}: 這個條目需要更新"),value:'update'},{label:wgULS("\{\{weasel\}\}: 此條目可能因為語意模稜兩可而損及其中立性","\{\{weasel\}\}: 此條目可能因為語意模稜兩可而損及其中立性"),value:'weasel'}];friendlytag.noticeList=[{label:wgULS("\{\{current\}\}: 本文記述一項新聞動態","\{\{current\}\}: 本文記述一項新聞動態"),value:'current',subgroup:{name:'current',type:'select',list:[{label:wgULS("\{\{current\}\}: 本文記述一項新聞動態","\{\{current\}\}: 本文記述一項新聞動態"),value:"current"},{label:wgULS("\{\{current spaceflight\}\}: 本文或本章節是關於目前或最近的太空任務","\{\{current spaceflight\}\}: 本文或本章節是關於目前或最近的太空任務"),value:"current spaceflight"},{label:wgULS("\{\{current sport\}\}: 此條目記述一項近期體育賽事","\{\{current sport\}\}: 此條目記述一項近期體育賽事"),value:"current sport"},{label:wgULS("\{\{current related\}\}: 本條目和一項新聞動態相關","\{\{current related\}\}: 本條目和一項新聞動態相關"),value:"current related"},{label:wgULS("\{\{recent death\}\}: 這是一篇關於最近逝世人物的文章","\{\{recent death\}\}: 這是一篇關於最近逝世人物的文章"),value:"recent death"}]}},{label:wgULS("\{\{future\}\}: 此條目是關於未來已定或預期會發生的事件","\{\{future\}\}: 此條目是關於未來已定或預期會發生的事件"),value:'future',subgroup:{name:'future',type:'select',list:[{label:wgULS("\{\{future\}\}: 此條目是關於未來已定或預期會發生的事件","\{\{future\}\}: 此條目關於未來已定或預期會發生的事件"),value:"future"},{label:"Engineering",list:[{label:wgULS("\{\{future infrastructure\}\}: 此條目是關於未來的建設或計劃","\{\{future infrastructure\}\}: 此條目是關於未來的建設或計劃"),value:"future infrastructure"},{label:wgULS("\{\{future software\}\}: 此條目包含計劃中或預期會發佈的未來軟件","\{\{future software\}\}: 此條目包含計劃中或預期會發佈的未來軟件"),value:"future software"},{label:wgULS("\{\{future spaceflight\}\}: 本條目為已列入計劃或可能進行的航天活動","\{\{future spaceflight\}\}: 本條目為已列入計劃或可能進行的航天活動"),value:"future spaceflight"}]},{label:"Entertainment",list:[{label:wgULS("\{\{future film\}\}: 此條目是關於正在計劃或拍攝中的電影","\{\{future film\}\}: 此條目是關於正在計劃或拍攝中的電影"),value:"future film"},{label:wgULS("\{\{future game\}\}: 此條目是關於尚未發行的電子遊戲","\{\{future game\}\}: 此條目是關於尚未發行的電子遊戲"),value:"future game"},{label:wgULS("\{\{future tvshow\}\}: 此條目包含有關正在計劃、拍攝中或有待播出的電視節目的信息","\{\{future tvshow\}\}: 此條目包含有關正在計劃、拍攝中或有待播出之電視節目訊息"),value:"future tvshow"},{label:wgULS("\{\{future tvshow information\}\}: 此條目包含有關正在播出的電視系列節目的信息","\{\{future tvshow information\}\}: 此條目包含有關正在播出的電視系列節目之訊息"),value:"future tvshow information"}]},{label:"Miscellaneous",list:[{label:wgULS("\{\{future election\}\}: 此條目是關於將舉辦或進行中的選舉","\{\{future election\}\}: 此條目是關於將舉辦或進行中的選舉"),value:"future election"},{label:wgULS("\{\{future product\}\}: 此條目是關於未上市產品的信息","\{\{future product\}\}: 此條目是關於未上市產品的訊息"),value:"future product"}]},{label:"Transportation",list:[{label:wgULS("\{\{future public transportation\}\}: 本文是關於未來的公共運輸建設或計劃","\{\{future public transportation\}\}: 本文是關於未來的公共運輸建設或計劃"),value:"future public transportation"}]},{label:"Sports",list:[{label:wgULS("\{\{future go\}\}: 此條目是關於一項預定進行的圍棋賽","\{\{future go\}\}: 此條目是關於一項預定進行的圍棋賽"),value:"future go"},{label:wgULS("\{\{future sport\}\}: 此條目是關於一項預定進行的體育競賽","\{\{future sport\}\}: 此條目是關於一項預定進行的體育競賽"),value:"future sport"}]}]}},{label:wgULS("\{\{inuse\}\}: 這篇文章正在進行重大修改","\{\{inuse\}\}: 這篇文章正在進行重大修改"),value:'inuse'},{label:wgULS("\{\{underconstruction\}\}: 這個條目是一個擴展或大修改,它並未供使用","\{\{underconstruction\}\}: 這個條目是一個擴展或大修改,它並未供使用"),value:'underconstruction'}];friendlytag.commonredirList=[{label:"\{\{簡繁重定向\}\}: 引導簡體至繁體,或繁體至簡體",value:'簡繁重定向'},{label:"\{\{模板重定向\}\}: 指向模板",value:'模板重定向'},{label:"\{\{別名重定向\}\}: 標題的其他名稱、筆名、綽號、同義字等",value:'別名重定向'},{label:"\{\{縮寫重定向\}\}: 標題縮寫",value:'縮寫重定向'},{label:"\{\{拼寫重定向\}\}: 標題的其他不同拼寫",value:'拼寫重定向'},{label:"\{\{錯字重定向\}\}: 標題的常見錯誤拼寫或誤植",value:'錯字重定向'},{label:"\{\{全名重定向\}\}: 標題的完整或更完整名稱",value:'全名重定向'},{label:"\{\{短名重定向\}\}: 完整標題名稱或人物全名的部分、不完整的名稱或簡稱",value:'短名重定向'},{label:"\{\{姓氏重定向\}\}: 人物姓氏",value:'姓氏重定向'},{label:"\{\{人名重定向\}\}: 人物人名",value:'人名重定向'},{label:"\{\{非中文重定向\}\}: 非中文標題",value:'非中文重定向'},{label:"\{\{日文重定向\}\}: 日語名稱",value:'日文重定向'}];friendlytag.rareredirList=[{label:"\{\{角色重定向\}\}: 電視劇、電影、書籍等作品的角色",value:'角色重定向'},{label:"\{\{章節重定向\}\}: 導向至較高密度(散文般密集)組織的頁面",value:'章節重定向'},{label:"\{\{列表重定向\}\}: 導向至低密度的列表",value:'列表重定向'},{label:"\{\{可能性重定向\}\}: 導向至當前提供內容更為詳盡的目標頁面、或該頁面的章節段落",value:'可能性重定向'},{label:"\{\{關聯字重定向\}\}: 標題名稱關聯字",value:'關聯字重定向'},{label:"\{\{捷徑重定向\}\}: 維基百科捷徑",value:'捷徑重定向'}];friendlytag.littleredirList=[{label:"\{\{重定向模板用重定向\}\}: 重定向模板用",value:'重定向模板用重定向'},{label:"\{\{EXIF重定向\}\}: JPEG圖像包含EXIF信息",value:'EXIF重定向'}];friendlytag.groupHash={'blpsources':true,'citation style':true,'refimprove':true,'roughtranslation':true,'onesource':true,'primarysources':true,'review':true,'fansite':true,'howto':true,'contradiction':true,'intromissing':true,'update':true,'jargon':true,'inappropriate person':true,'npov':true,'or':true,'disputed':true,'blpdispute':true,'weasel':true,'notability':true,'globalize':true,'tone':true,'advert':true,'in-universe':true,'expert':true,'verylong':true,'expand':true,'orphan':true,'copyedit':true,'rewrite':true,'citecheck':true,'wikify':true,'trivia':true,'cleanup':true,'importance':true,'unencyclopedic':true,'newsrelease':true,'hoax':true,'grammar':true,'unreferenced':true}
friendlytag.callbacks={main:function(self){var form=self.responseXML.getElementById('editform');var tagRe,text='',summaryText='添加';var tags=new Array(),groupableTags=new Array();var isNotability=false;if(!isRedirect){Status.info('信息','檢查條目已有模板');for(var i=0;i<self.params.tags.length;i++){tagRe=new RegExp('(\\{\\{'+self.params.tags[i]+'(\\||\\}\\}))','im');if(!tagRe.exec(form.wpTextbox1.value)){if(friendlytag.groupHash[self.params.tags[i]]){groupableTags=groupableTags.concat(self.params.tags[i]);}else{tags=tags.concat(self.params.tags[i]);}}else{Status.info('信息','已在條目中找到\{\{'+self.params.tags[i]
+'\}\}...跳過');}}
if(self.params.group&&groupableTags.length>=3){Status.info('信息','合併支持的模板至\{\{article issues\}\}');groupableTags.sort();text+='\{\{article issues\n';summaryText+=' \{\{[[Template:article issues|article issues]]\}\}參數:';for(var i=0;i<groupableTags.length;i++){text+='|'+groupableTags[i]
+'=\{\{subst:#time:c\}\}\n';if(i==(groupableTags.length-1)){summaryText+='和';}else if(i<(groupableTags.length-1)&&i!=0){summaryText+=',';}
summaryText+=''+groupableTags[i];}
text+='\}\}\n';}else{tags=tags.concat(groupableTags);}}else{Status.info('信息','檢查重定向已有模板');for(var i=0;i<self.params.tags.length;i++){tagRe=new RegExp('(\\{\\{'+self.params.tags[i]+'(\\||\\}\\}))','im');if(!tagRe.exec(form.wpTextbox1.value)){tags=tags.concat(self.params.tags[i]);}else{Status.info('信息','已在重定向中找到\{\{'+self.params.tags[i]
+'\}\}...跳過');}}}
tags.sort();for(var i=0;i<tags.length;i++){if(tags[i]=='uncategorized'||tags[i]=='catimprove'){form.wpTextbox1.value+='\n\n\{\{'+tags[i]
+'|time=\{\{subst:#time:c\}\}\}\}';}else{if(tags[i]=='current'){text+='\{\{'+self.params.currentSubcategory;}else if(tags[i]=='future'){text+='\{\{'+self.params.futureSubcategory;}else{text+=(isRedirect?'\n':'')+'\{\{'+tags[i];}
if(tags[i]=='notability'&&self.params.notabilitySubcategory!='none'){text+='|3='+self.params.notabilitySubcategory;}
if(tags[i]=='notability'){isNotability=true;}
if(tags[i]=='do-attempt'){text+='|att=\{\{subst:#time:c\}\}\}\}\n';}else{text+=isRedirect?'\}\}':'|time=\{\{subst:#time:c\}\}\}\}\n';}}
if(i==(tags.length-1)&&(i>0||groupableTags.length>3)){summaryText+='和';}else if(i<(tags.length-1)&&(i!=0||groupableTags.length>3)){summaryText+=', ';}
summaryText+=' \{\{[[Template:';if(tags[i]=='current'){summaryText+=self.params.currentSubcategory+'|'+self.params.currentSubcategory;}else if(tags[i]=='future'){summaryText+=self.params.futureSubcategory+'|'+self.params.futureSubcategory;}else{summaryText+=tags[i]+'|'+tags[i];}
summaryText+=']]\}\}';}
if(!isRedirect){text+=form.wpTextbox1.value;}else{text=form.wpTextbox1.value+text;}
summaryText+='標記至'+(isRedirect?'重定向':'條目')+FriendlyConfig.summaryAd;var postData={'wpMinoredit':FriendlyConfig.markTaggedPagesAsMinor?1:undefined,'wpWatchthis':form.wpWatchthis.checked?1:(FriendlyConfig.watchTaggedPages?1:undefined),'wpStarttime':form.wpStarttime.value,'wpEdittime':form.wpEdittime.value,'wpAutoSummary':form.wpAutoSummary.value,'wpEditToken':form.wpEditToken.value,'wpSummary':summaryText,'wpTextbox1':text};self.post(postData);if(FriendlyConfig.markTaggedPagesAsPatrolled&&self.params.rcid!=''){var query={'title':wgPageName,'action':'markpatrolled','rcid':self.params.rcid};var wikipedia_wiki=new Wikipedia.wiki('標記條目為已巡查',query);wikipedia_wiki.post();}
if(isNotability){var query={'title':'Wikipedia:關注度/提報','action':'submit'};var callback=function(self){var xmlDoc=self.responseXML;if(wgPageName!=('Wikipedia:關注度/提報')){var query={'title':'Wikipedia:關注度/提報','action':'submit'};var wikipedia_wiki=new Wikipedia.wiki("提報至關注度報告頁",query,friendlytag.callbacks.tagNotability);wikipedia_wiki.params=self.params;wikipedia_wiki.get();}else{Status.info("信息","當前頁面為關注度報告頁,取消通知");}}
var wikipedia_api=new Wikipedia.api("抓關注度報告頁數據",query,callback);wikipedia_api.params=self.params;wikipedia_api.post();}},tagNotability:function(self){var form=self.responseXML.getElementById('editform');var text=form.wpTextbox1.value;text+="\{\{subst:Wikipedia:關注度/提報/item|title="+wgPageName+"\}\}";var postData={'wpMinoredit':form.wpMinoredit.checked?'':undefined,'wpWatchthis':form.wpWatchthis.checked?'':undefined,'wpStarttime':form.wpStarttime.value,'wpEdittime':form.wpEdittime.value,'wpAutoSummary':form.wpAutoSummary.value,'wpEditToken':form.wpEditToken.value,'wpSection':'','wpSummary':"報告:頁面\[\["+wgPageName+"\]\]關注度不足"+FriendlyConfig.summaryAd,'wpTextbox1':text};self.post(postData);}}
friendlytag.callback.evaluate=function friendlytagCallbackEvaluate(e){var form=e.target;if(isRedirect){var tags=form.getChecked('commonredir').concat(form.getChecked('rareredir')).concat(form.getChecked('littleredir'));}else{if(typeof(FriendlyConfig.customTagList)=='object'){var tags=form.getChecked('notice').concat(form.getChecked('problem')).concat(form.getChecked('maintenance')).concat(form.getChecked('custom'));}else{var tags=form.getChecked('notice').concat(form.getChecked('problem')).concat(form.getChecked('maintenance'));}
var notabilitySubcategory=form.getChecked('problem.notability');var currentSubcategory=form.getChecked('notice.current');var futureSubcategory=form.getChecked('notice.future');}
var params;if(tags.length==0){alert('你必須至少選擇一個標籤');return;}
if(!isRedirect){params={tags:tags,group:form.group.checked,notabilitySubcategory:notabilitySubcategory?notabilitySubcategory[0]:null,currentSubcategory:currentSubcategory?currentSubcategory[0]:null,futureSubcategory:futureSubcategory?futureSubcategory[0]:null,rcid:QueryString.exists('rcid')?QueryString.get('rcid'):''}}else{params={tags:tags,rcid:QueryString.exists('rcid')?QueryString.get('rcid'):''}}
Status.init(form);var query={'title':wgPageName,'action':'submit'};Wikipedia.actionCompleted.redirect=wgPageName;Wikipedia.actionCompleted.notice="完成";var wikipedia_wiki=new Wikipedia.wiki('條目修改',query,friendlytag.callbacks.main);wikipedia_wiki.params=params;wikipedia_wiki.get();}