User:Alexsh/csd.js
外观
注意:保存之后,你必须清除浏览器缓存才能看到做出的更改。Google Chrome、Firefox、Microsoft Edge及Safari:按住⇧ Shift键并单击工具栏的“刷新”按钮。参阅Help:绕过浏览器缓存以获取更多帮助。
if (wgAction == 'delete'){
var csdMsg = {
Assk:'a',
Aler:wgULS('无法载入选择栏','無法載入選擇欄'),
Reason:wgULS('快速删除理由','快速刪除理由'),
NoOption:wgULS('没有任何选项','沒有任何選項'),
G:[
{"value":"[[WP:CSD#G1|CSD G1]]: "+wgULS('没有实际内容或历史纪录的文章','沒有實際內容或歷史記錄的文章'),
"display":"G1 - "+wgULS('无实际内容','無實際內容')},
{"value":"[[WP:CSD#G2|CSD G2]]: "+wgULS('测试页','測試頁'),
"display":"G2 - "+wgULS('测试页','測試頁')},
{"value":"[[WP:CSD#G3|CSD G3]]: "+wgULS('单纯的破坏','單純的破壞'),
"display":"G3 - "+wgULS('单纯破坏','單純破壞')},
{"value":"[[WP:CSD#G4|CSD G4]]: "+wgULS('重覆建立的内容','重覆建立的內容'),
"display":"G4 - "+wgULS('重覆建立的内容','重覆建立的內容')},
{"value":"[[WP:CSD#G5|CSD G5]]: "+wgULS('被封禁用户的贡献','被封禁用戶的貢獻'),
"display":"G5 - "+wgULS('被封禁用户','被封禁用戶')},
{"value":"[[WP:CSD#G6|CSD G6]]: "+wgULS('暂时删除以进行合并','暫時刪除以進行合併'),
"display":"G6 - "+wgULS('合并暂删','合併暫刪')},
{"value":"[[WP:CSD#G7|CSD G7]]: "+wgULS('创建者请求删除','創建者請求刪除'),
"display":"G7 - "+wgULS('创建者请求','創建者請求')},
{"value":"[[WP:CSD#G8|CSD G8]]: "+wgULS('页面不存在的讨论页','頁面不存在的討論頁'),
"display":"G8 - "+wgULS('讨论页','討論頁')},
{"value":"[[WP:CSD#G9|CSD G9]]: "+wgULS('基金会请求','基金會請求'),
"display":"G9 - "+wgULS('基金会请求','基金會請求')},
{"value":"[[WP:CSD#G10|CSD G10]]: "+wgULS('以攻击为目的而建立的页面','以攻擊為目的而建立的頁面'),
"display":"G10 - "+wgULS('攻击页面','攻擊頁面')},
{"value":"[[WP:CSD#G11|CSD G11]]: "+wgULS('广告、宣传或联络用页面','廣告、宣傳或聯絡用頁面'),
"display":"G11 - "+wgULS('广告页','廣告頁')},
{"value":"[[WP:CSD#G12|CSD G12]]: "+wgULS('单纯违反版权','單純違反版權'),
"display":"G12 - "+wgULS('单纯违反版权','單純違反版權')}
],
A:[
{"value":"[[WP:CSD#A1|CSD A1]]: "+wgULS('非常短的文章或无内容','非常短的文章或無內容'),
"display":"A1 - "+wgULS('短文章或无内容','短文章無內容')},
{"value":"[[WP:CSD#A2|CSD A2]]: "+wgULS('其他语言文章','其他語言文章'),
"display":"A2 - "+wgULS('其他语言','其他語言')},
{"value":"[[WP:CSD#A3|CSD A3]]: "+wgULS('无意义内容','無意義內容'),
"display":"A3 - "+wgULS('无意义内容','無意義內容')},
{"value":"[[WP:CSD#A5|CSD A5]]: "+wgULS('已转至其他计划','已轉至其他計畫'),
"display":"A5 - "+wgULS('转存其他计划','轉存其他計畫')},
{"value":"[[WP:CSD#A7|CSD A7 (人物)]]: Biographical article that does not assert significance",
"display":"A7 - Unremarkable Bio"},
{"value":"[[WP:CSD#A7|CSD A7 (組織)]]: Article about a club or group that does not assert significance",
"display":"A7 - Unremarkable Group"},
{"value":"[[WP:CSD#A7|CSD A7 (樂團)]]: Article about a band that does not assert [[WP:MUSIC|significance]]",
"display":"A7 - Unremarkable Band"},
{"value":"[[WP:CSD#A7|CSD A7 (公司)]]: Article about a company that doesn't asser [[WP:CORP|significance]]",
"display":"A7 - Unremarkable Firm"},
{"value":"[[WP:CSD#A7|CSD A7 (網站)]]: Article about a web site that does not assert [[WP:WEB|significance]]",
"display":"A7 - Unremarkable Web"},
{"value":"[[WP:CSD#A7|CSD A7]]: Article about subject that does not assert significance.",
"display":"A7 - Other"}
],
R:[
{"value":"[[WP:CSD#R1|CSD R1]]: 不存在的重定向","display":"R1 - "+wgULS('损坏的重定向','損壞的重定向')},
{"value":"[[WP:CSD#R2|CSD R2]]: "+wgULS('重定向到用户页或用户讨论页','重定向到用戶頁或用戶討論頁'),
"display":"R2 - "+wgULS('跨名称空间','跨名稱空間')},
{"value":"[[WP:CSD#R3|CSD R3]]: "+wgULS('错误建议的重定向','錯誤建議的重定向'),
"display":"R3 - "+wgULS('错误的重定向','錯誤的重定向')}
],
I:[
{"value":"[[WP:CSD#I1|CSD I1]]: Redundant to another image",
"display":"I1 - Redundant"},
{"value":"[[WP:CSD#I2|CSD I2]]: Image is corrupted",
"display":"I2 - Corrupt/Empty"},
{"value":"[[WP:CSD#I3|CSD I3]]: "+wgULS('不适当的版权宣告','不適當的版權宣告'),
"display":"I3 - "+wgULS('版权错误','版權錯誤')},
{"value":"[[WP:CSD#I4|CSD I4]]: "+wgULS('来源或版权不明','來源或版權不明'),
"display":"I4 - "+wgULS('旡来源或版权','無來源或版權')},
{"value":"[[WP:CSD#I5|CSD I5]]: "+wgULS('图片非自由版权且未使用','圖片非自由版權且未使用'),
"display":"I5 - 未使用且不自由"},
{"value":"[[WP:CSD#I6|CSD I6]]: "+wgULS('无合理使用证明','無合理使用證明'),
"display":"I6 - 非FU"},
{"value":"[[WP:CSD#I7|CSD I7]]: "+wgULS('不正确的合理使用','不正確的合理使用'),
"display":"I7 - "+wgULS('不正确FU','不正確FU')},
{"value":"[[WP:CSD#I8|CSD I8]]: "+wgULS('图片已存于[[:commons|维基共享资源]]','圖片已存於[[:commons|維基共享資源]]'),
"display":"I8 - "+wgULS('已存于Commons','已存於Commons')}
],
C:[
{"value":"[[WP:CSD#C1|CSD C1]]: "+wgULS('空目录且净空24hr','空目錄且淨空24hr'),
"display":"C1 - "+wgULS('目录已净空','目錄已淨空')},
{"value":"[[WP:CSD#C2|CSD C2]]: 快速更名",
"display":"C2 - 更名"},
{"value":"[[WP:CSD#C3|CSD C3]]: Corresponding template was deleted",
"display":"C3 - Template"}
],
U:[
{"value":"[[WP:CSD#U1|CSD U1]]: "+wgULS('用户要求删除','用戶要求刪除'),
"display":"U1 - "+wgULS('用户请求','用戶請求')},
{"value":"[[WP:CSD#U2|CSD U2]]: "+wgULS('该用户不存在','該用戶不存在'),
"display":"U2 - 不存在"},
{"value":"[[WP:CSD#U3|CSD U3]]: Userpage that is primarily a gallery of fair use images",
"display":"U3 - Fair Use Gallery"}
],
T:[
{"value":"[[WP:CSD#T1|CSD T1]]: Template that is divisive and inflammatory.",
"display":"T1 - Divisive"}
],
P:[
{"value":"[[WP:CSD#P2|CSD P2]]: Underpopulated",
"display":"P2 - Underpopulated"},
{"value":"[[WP:AFD|AFD]]: Deleted after discussion at Articles for Deletion",
"display":"AFD close"},
{"value":"[[WP:PROD|Prod]] left uncontested for five days.",
"display":"Prod close"}
]
}
csdMsg.DelReason=csdMsg.G.concat(csdMsg.R);
switch(wgNamespaceNumber){
case 0:
csdMsg.DelReason=csdMsg.DelReason.concat(csdMsg.A);
break;
case 2||3:
csdMsg.DelReason=csdMsg.DelReason.concat(csdMsg.U);
break;
case 6:
csdMsg.DelReason=csdMsg.DelReason.concat(csdMsg.I);
break;
case 14||15:
csdMsg.DelReason=csdMsg.DelReason.concat(csdMsg.C);
break;
case 10:
csdMsg.DelReason=csdMsg.DelReason.concat(csdMsg.T);
break;
default: break;
}
csdMsg.DelReason=csdMsg.DelReason.concat(csdMsg.P);
addOnloadHook(addSelectAfter);
}
function FillSelect(sel, arr){
if(arr && arr.length>0){
if(arr.length>1){
var FirstOpt = new Option(csdMsg.Reason, "");
if(FirstOpt.innerHTML != csdMsg.Reason) {FirstOpt.innerHTML = csdMsg.Reason;}// catches stupid IE error
sel.accesskey=csdMsg.Assk;
sel.appendChild(FirstOpt);
sel.options[0].style.color = "gray"
}
sel.disabled = false;
for(var i=0;i<arr.length;i++){
var opt = new Option(arr[i].display, arr[i].value);
if(opt.innerHTML != arr[i].display) opt.innerHTML = arr[i].display;// catches stupid IE error
sel.appendChild(opt);
}
}else{
sel.options[0] = new Option(csdMsg.NoOption, "");
// catches stupid IE error
if(sel.options[0].innerHTML != csdMsg.NoOption) sel.options[0].innerHTML = csdMsg.NoOption;
sel.disabled = true;
return false;
}
return true;
}
function addSelectAfter(){
var obj = document.getElementById('wpReason') || document.getElementById('wpComment');
// create select using included array
var sel = document.createElement("SELECT");
FillSelect(sel, csdMsg.DelReason);
// name it
sel.name = "csdOptions";
sel.id = "csdOptions";
sel.style.marginLeft = "10px";
if(wgNamespaceNumber!=6&&document.getElementById('wpWatch')){
sel.tabIndex=2;
document.getElementById('wpWatch').tabIndex=3;
document.getElementById('wpConfirmB').tabIndex=4;
}
addHandler( sel, 'change', function(){obj.value=sel.value;} );
// check for next sibling and insert before it or at the end
if(obj){
if(obj.nextSibling){
obj.parentNode.insertBefore(sel,obj.nextSibling);
}else{
obj.parentNode.appendChild(sel);
}
}
}