User:Altt311/vfd.js
外观
注意:保存之后,你必须清除浏览器缓存才能看到做出的更改。Google Chrome、Firefox、Microsoft Edge及Safari:按住⇧ Shift键并单击工具栏的“刷新”按钮。参阅Help:绕过浏览器缓存以获取更多帮助。
if(!mwCustomEditButtons.Signature){mwCustomEditButtons.Signature='—~~\~~';}
/**
* 创建vfd菜单
*/
if(/^Wikipedia:頁面存廢討論\//i.test(wgPageName) ||/^Wikipedia:檔案存廢討論\//i.test(wgPageName) ||/^Wikipedia:删除投票和请求\//i.test(wgPageName) || wgPageName == "Wikipedia:頁面恢復請求" ){
addDropdownMenu("DeleteVote","刪除投票",[
{
id : "Keep",
text : "保留",
tagOpen : "{\{vk}\}",
tagClose : "—~~\~~\n"
},
{
id : "SpeedKeep",
text : "快速保留",
tagOpen : "{\{vsk}\}",
tagClose : "—~~\~~\n"
},
{
id : "Delete",
text : "刪除",
tagOpen : "{\{vd}\}",
tagClose : "—~~\~~\n"
},
{
id : "SpeedDelete",
text : "快速刪除",
tagOpen : "{\{vsd}\}",
tagClose : "—~~\~~\n"
},
{
id : "Merge",
text : "合併",
tagOpen : "{\{vm}\}",
tagClose : "—~~\~~\n"
},
{
id : "Move",
text : "移動",
tagOpen : "{\{vmove}\}",
tagClose : "—~~\~~\n"
},
{
id : "Redirect",
text : "重定向",
tagOpen : "{\{vr}\}到[[",
sampleText : "條目",
tagClose : "]]—~~\~~\n"
},
{
id : "ToSource",
text : "移動到文庫",
tagOpen : "{\{vms}\}",
tagClose : "—~~\~~\n"
},
{
id : "ToDict",
text : "移動到詞典",
tagOpen : "{\{vmd}\}",
tagClose : "—~~\~~\n"
},
{
id : "ToBook",
text : "移動到教科書",
tagOpen : "{\{vmb}\}",
tagClose : "—~~\~~\n"
},
{
id : "ToQuote",
text : "移動到語錄",
tagOpen : "{\{vmq}\}",
tagClose : "—~~\~~\n"
}
]);
function getVfdAction(tagOpen, tagClose){
return function(){insertSect(/(^|\r?\n)===[^=].*?=== *\r?\n/g, tagOpen, tagClose);}
}
addDropdownMenu("vfdInsertSel",wgULS('删除管理','刪除管理'),[
{
id : "vfdDeleted",
text : 'D'+wgULS('删除','刪除'),
summary : wgULS('处理:删除', '處理:刪除'),
minor : false,
action : getVfdAction("{\{delh|d}\}\n","{\{subst:deleted}\}"+mwCustomEditButtons.Signature+"\n{\{delf}\}")
},
{
id : "vfdKept",
text : 'K'+wgULS('保留','保留'),
summary : wgULS('结束:保存', '結束:保存'),
minor : false,
action : getVfdAction("{\{delh|k}\}\n","{\{subst:kept}\}"+mwCustomEditButtons.Signature+"\n{\{delf}\}")
},
{
id : "vfdSpeedlyDeleted",
text : wgULS('快速删除','快速刪除'),
summary : wgULS('处理:速删', '處理:速刪'),
minor : false,
action : getVfdAction("{\{delh|sd}\}\n","{\{subst:SpeedyDeleted}\}"+mwCustomEditButtons.Signature+"\n{\{delf}\}")
},
{
id : "vfdSpeedlyKept",
text : wgULS('快速保留','快速保留'),
summary : wgULS('处理:速留', '處理:速留'),
minor : false,
action : getVfdAction("{\{delh|sk}\}\n","----\n快速保留"+mwCustomEditButtons.Signature+"\n{\{delf}\}")
},
{
id : "vfdMoved",
text : 'M'+wgULS('移动','移動'),
summary : wgULS('处理:移动', '處理:移動'),
minor : false,
action : getVfdAction("{\{delh|m}\}\n","----\n已移動"+mwCustomEditButtons.Signature+"\n{\{delf}\}")
},
{
id : "vfdLSSD",
text : 'N'+wgULS('无来源版权','無來源版權'),
summary : wgULS('处理:LSSD', '處理:LSSD'),
minor : false,
action : getVfdAction("{\{delh|lssd}\}\n","----\n無來源或版權"+mwCustomEditButtons.Signature+"\n{\{delf}\}")
},
{
id : "vfdImageCopyvio",
text : 'I'+wgULS("图片侵权删除","圖片侵權刪除"),
summary : wgULS('确认侵权,删除', '確認侵權,刪除'),
minor : false,
action : getVfdAction("{\{delh|ic}\}\n","----\n本圖片已確認侵權,刪除。"+mwCustomEditButtons.Signature+"\n{\{delf}\}")
},
{
id : "vfdNoConsensus",
text : wgULS("讨论无共识","討論無共識"),
summary : wgULS('无共识', '無共識'),
minor : false,
action : getVfdAction("{\{delh|nc}\}\n","{\{subst:nc}\}"+mwCustomEditButtons.Signature+"\n{\{delf}\}")
},
{
id : "vfdRedirected",
text : wgULS("条目重定向","條目重定向"),
summary : wgULS('条目重定向',"條目重定向"),
minor : false,
action : getVfdAction("{\{delh|r}\}\n","----\n已重定向"+mwCustomEditButtons.Signature+"\n{\{delf}\}")
},
{
id : "vfdCategoryRedirected",
text : wgULS("类别重定向","類別重定向"),
summary : wgULS('类别重定向',"類別重定向"),
minor : false,
action : getVfdAction("{\{delh|cr}\}\n","----\n已重定向"+mwCustomEditButtons.Signature+"\n{\{delf}\}")
},
{
id : "vfdNowCommons",
text : "已在共享提供",
summary : "NowCommons",
minor : false,
action : getVfdAction("{\{delh|nowcommons}\}\n","----\n已在共享資源提供,快速刪除"+mwCustomEditButtons.Signature+"\n{\{delf}\}")
},
{
id : "vfdRequestInCommons",
text : wgULS("应在共享提请","應在共享提請"),
summary : wgULS('此图在Commons,无法处理', "此圖在Commons,無法處理"),
minor : false,
action : getVfdAction("{\{delh|commons}\}\n","----此圖像於[[維基共享資源]],請至[[commons:COM:AFD|共享的刪除請求]]提出。"+mwCustomEditButtons.Signature+"\n{\{delf}\}")
},
{
id : "vfdTransferToCopyvio",
text : wgULS("转交侵权投票","轉交侵權投票"),
summary : wgULS("转交侵权投票","轉交侵權投票"),
minor : false,
action : getVfdAction("{\{delh|c}\}\n","{\{subst:(C)Problem}\}"+mwCustomEditButtons.Signature+"\n{\{delf}\}")
},
{
id : "vfdIneffectualRequest",
text : wgULS("请求无效","請求無效"),
summary : wgULS("无效","無效"),
minor : false,
action : getVfdAction("{\{delh|ir}\}\n","----\n請求無效。"+mwCustomEditButtons.Signature+"\n{\{delf}\}")
},
{
id : "vfdReasonDisappear",
text : wgULS("请求理由消失","請求理由消失"),
summary : wgULS("请求理由消失","請求理由消失"),
minor : false,
action : getVfdAction("{\{delh|rr}\}\n","----\n請求理由消失"+mwCustomEditButtons.Signature+"\n{\{delf}\}")
},
{
id : "vfdRepeatRequest",
text : "重複請求",
summary : "重複",
minor : false,
action : getVfdAction("{\{delh|rep}\}\n","----\n重複提出"+mwCustomEditButtons.Signature+"\n{\{delf}\}")
},
{
id : "vfdSelfCancel",
text : "自行撤銷",
summary : "自行撤銷",
minor : false,
action : getVfdAction("{\{delh|提刪者撤回}\}\n","----\n提刪者撤回"+mwCustomEditButtons.Signature+"\n{\{delf}\}")
},
{
id : "vfdRepeatDeleted",
text : wgULS("锁定条目","鎖定條目"),
summary : wgULS('删除+白纸保护', "刪除+白紙保護"),
minor : false,
action : getVfdAction("{\{delh|drep}\}\n","----\n刪除+白紙保護"+mwCustomEditButtons.Signature+"\n{\{delf}\}")
},
{
id : "vfdImageConvertedSVG",
text : wgULS("图片已转SVG","圖片已轉SVG"),
summary : wgULS("已转SVG","已轉SVG"),
minor : false,
action : getVfdAction("{\{delh|svg}\}\n","----\n此圖片已轉成SVG,快速刪除"+mwCustomEditButtons.Signature+"\n{\{delf}\}")
},
{
id : "vfdTransWN",
text : wgULS("移至新闻","移至新聞"),
summary : wgULS("移至维基新闻","移至維基新聞"),
minor : false,
action : getVfdAction("{\{delh|twn}\}\n","----\n已移動至維基新聞"+mwCustomEditButtons.Signature+"\n{\{delf}\}")
},
{
id : "vfdTransWS",
text : wgULS("移至文库","移至文庫"),
summary : wgULS("移至维基文库","移至維基文庫"),
minor : false,
action : getVfdAction("{\{delh|tws}\}\n","----\n已移動至維基文庫"+mwCustomEditButtons.Signature+"\n{\{delf}\}")
},
{
id : "vfdTransWB",
text : wgULS("移至教科书","移至教科書"),
summary : wgULS("移至维基教科书","移至維基教科書"),
minor : false,
action : getVfdAction("{\{delh|twb}\}\n","----\n已移動至維基教科書"+mwCustomEditButtons.Signature+"\n{\{delf}\}")
},
{
id : "vfdTransWQ",
text : wgULS("移至语录","移至語錄"),
summary : wgULS("移至维基语录","移至維基語錄"),
minor : false,
action : getVfdAction("{\{delh|twq}\}\n","----\n已移動至維基語錄"+mwCustomEditButtons.Signature+"\n{\{delf}\}")
},
{
id : "vfdTransWT",
text : wgULS("移至词典","移至詞典"),
summary : wgULS("移至维基词典","移至維基詞典"),
minor : false,
action : getVfdAction("{\{delh|twt}\}\n","----\n已移動至維基詞典"+mwCustomEditButtons.Signature+"\n{\{delf}\}")
},
{
id : "vfdTransOther",
text : "移至其他計劃",
summary : "移至其他計劃",
minor : false,
action : getVfdAction("{\{delh|two}\}\n","----\n已移動至其他維基計劃"+mwCustomEditButtons.Signature+"\n{\{delf}\}")
},
{
id : "vfdOther",
text : "其他",
summary : wgULS("处理", "處理"),
minor : false,
action : getVfdAction("{\{delh|請在此輸入處理結果}\}\n","----\n請在此輸入處理結果"+mwCustomEditButtons.Signature+"\n{\{delf}\}")
}
]);
}