User:Kivary/Edittools.js
外观
注意:保存之后,你必须清除浏览器缓存才能看到做出的更改。Google Chrome、Firefox、Microsoft Edge及Safari:按住⇧ Shift键并单击工具栏的“刷新”按钮。参阅Help:绕过浏览器缓存以获取更多帮助。
//define buttons 定義按鈕與下拉菜單
addEditButton("btnBold",{
src : "6/6f/Bold_icon.png",
tagOpen : "\'\'\'",
sampleText : "粗体",
tagClose : "\'\'\'",
speedTip : wgULS("粗体","粗體")
});
addEditButton("btnItalic",{
src : "d/d7/Italic_icon.png",
tagOpen : "\'\'",
sampleText : "斜体",
tagClose : "\'\'",
speedTip : wgULS("斜体","斜體")
});
addEditButton("btnStrike",{
src : "c/c9/Button_strike.png",
tagOpen : "<del>",
sampleText : wgULS("删除线","刪除線"),
tagClose : "</del>",
speedTip : wgULS("删除线","刪除線")
});
addEditButton("btnBig",{
src : "5/56/Button_big.png",
tagOpen : '<span style="font-size:larger;">',
sampleText : "放大",
tagClose : "</span>",
speedTip : "放大"
});
addEditButton("btnSmall",{
src : "5/58/Button_small.png",
tagOpen : '<span style="font-size:smaller;">',
sampleText : wgULS("缩小","縮小"),
tagClose : "</span>",
speedTip : wgULS("缩小","縮小")
});
addEditButton("btnExtraLink",{
src : "7/73/External_link_icon.png",
tagOpen : "[",
sampleText : "http://www.example.com 链接标题",
tagClose : "]",
speedTip : wgULS("外部链接(加前缀 http://)","外部連接(加前綴http://)")
});
addEditButton('btnRedirect',{
src : "4/47/Button_redir.png",
tagOpen : "#REDIRECT [[",
sampleText : wgULS("目标条目名","目標條目名"),
tagClose : "]]",
speedTip : "重定向"
});
addEditButton("btnCategory",{
src : "b/b4/Button_category03.png",
tagOpen : "[[Category:",
sampleText : wgULS("分类名","分類名"),
tagClose : "]]",
speedTip : wgULS("分类","分類")
});
addEditButton("btnImage",{
src : "f/f0/Image_icon.png",
tagOpen : "[[File:",
sampleText : "Example.jpg",
tagClose : "]]",
speedTip : wgULS("嵌入图像","嵌入圖像")
});
addEditButton('btnAdvImage',{
src : "1/1c/Button_advanced_image.png",
tagOpen : "<imagemap>\n",
sampleText : "File:圖像名 | 100px | 描述\nrect 0 0 50 50 [[鏈接]]\ncircle 50 50 20 [[鏈接B]]\ndesc bottom-left\n",
tagClose : "</imagemap>",
speedTip : wgULS("高级画像", "高級畫像")
});
var __temp="\nFile:PictureFileName.jpg|"+wgULS("图片题注","圖片題注");
addEditButton('btnGallery',{
src : "9/9e/Btn_toolbar_gallery.png",
tagOpen : "<gallery>\n",
sampleText : __temp+__temp,
tagClose : "\n</gallery>",
speedTip : wgULS("画廊", "畫廊")
});
delete __temp;
addEditButton("btnNowiki",{
src : "2/23/Button_code.png",
tagOpen : "<code><nowiki>",
sampleText : "插入非格式文本",
tagClose : "</nowiki></code>",
speedTip : "插入非格式文本"
});
addEditButton('btnSigOnly',{
src : 'd/d8/Button_sig_zh.png',
tagOpen : '— ~~\~',
sampleText : '',
tagClose : '',
speedTip : wgULS('签名(无日期)','簽名(無日期)'),
width : 8
});
addEditButton("btnSignature",{
src : "6/6d/Button_sig.png",
tagOpen : "— ~~\~~",
sampleText : "",
tagClose : "",
speedTip : wgULS("签名","簽名")
});
addEditButton("btnHr",{
src : "a/a4/H-line_icon.png",
tagOpen : "\n----\n",
sampleText : "",
tagClose : "",
speedTip : wgULS("水平线","水平線")
});
addEditButton("btnBr",{
src : "1/13/Button_enter.png",
tagOpen : "<br />",
sampleText : "",
tagClose : "",
speedTip : wgULS("换行","換行")
});
addEditButton("btnEnum",{
src : "8/88/Btn_toolbar_enum.png",
tagOpen : "#",
sampleText : "",
tagClose : "",
speedTip : wgULS("数字列表","數字列表"),
action : "lineInsert"
});
addEditButton("btnList",{
src : "1/11/Btn_toolbar_liste.png",
tagOpen : "*",
sampleText : "",
tagClose : "",
speedTip : wgULS("符号列表","符號列表"),
action : "lineInsert"
});
addEditButton("btnDefine",{
src : "d/d3/Button_definition_list.png",
tagOpen : "; ",
sampleText : wgULS("释义","釋義") ,
tagClose : " : ",
speedTip : wgULS("定义文本","定義文本"),
action : "lineInsert"
});
addEditButton("btnColor",{
src : "1/1e/Button_font_color.png",
tagOpen : '<span style="color: ColorName;">',
sampleText : "彩色文本",
tagClose : "</span>",
speedTip : "彩色文本"
});
addEditButton("btnTable",{
src : "0/04/Button_array.png",
tagOpen : '\n{| border="wikitable"',
sampleText : "",
tagClose : "\n|}\n",
speedTip : "插入表格"
});
addEditButton('btnAlignLeft',{
src : "e/ea/Button_align_left.png",
tagOpen : '<div style="text-align: left;">\n',
sampleText : wgULS("左对齐","左對齊"),
tagClose : "\n</div>",
speedTip : wgULS("左对齐","靠左對齊"),
action : 'lineInsert'
});
addEditButton('btnAlignCenter',{
src : "5/5f/Button_center.png",
tagOpen : '<div style="text-align: center;">\n',
sampleText : wgULS("居中","置中"),
tagClose : "\n</div>",
speedTip : wgULS("居中","置中"),
action : 'lineInsert'
});
addEditButton('btnAlignRight',{
src : "a/a5/Button_align_right.png",
tagOpen : '<div style="text-align: right;">\n',
sampleText : wgULS("右对齐","靠右對齊"),
tagClose : "\n</div>",
speedTip : wgULS("右对齐","靠右對齊"),
action : 'lineInsert'
});
addEditButton('btnSup',{
src : "6/6a/Button_sup_letter.png",
tagOpen : "<sup>",
sampleText : wgULS("上标","上標"),
tagClose : "</sup>",
speedTip : wgULS("上标","上標")
});
addEditButton('btnSub',{
src : "a/aa/Button_sub_letter.png",
tagOpen : "<sub>",
sampleText : wgULS("下标","下標"),
tagClose : "</sub>",
speedTip : wgULS("下标","下標")
});
addEditButton("btnRef",{
src : "c/c4/Button_ref.png",
tagOpen : "<ref>",
sampleText : wgULS("参考","參考"),
tagClose : "</ref>",
speedTip : wgULS("参考","參考")
});
addEditButton("btnRef2",{
src : "c/cf/Button_ref_adv.png",
tagOpen : '<ref name="">',
sampleText : wgULS("同项参考","同項參考"),
tagClose : "</ref>",
speedTip : wgULS("同项参考","同項參考"),
width : 12
});
addEditButton("btnReferences",{
src : "7/79/Button_reflink.png",
tagOpen : "{\{reflist|",
sampleText : "1",
tagClose : "}\}",
speedTip : wgULS("参考文献","參考文獻"),
});
addEditButton("btnReferencesWeb",{
src : "9/91/Button_cite_web.png",
tagOpen : '<ref name="">{\{cite web | language = | publisher = | title = | url = | author = | date = | accessdate = ',
sampleText : "",
tagClose : "}\}<\/ref>",
speedTip : wgULS('引用网页','引用網頁'),
});
addEditButton("btnReferencesBook",{
src : "e/ef/Button_cite_book.png",
tagOpen : '<ref name="">{\{cite book | language = | author = | coauthors = | title = | url = | date = | location = | publisher = | id = | isbn = | pages = ',
sampleText : "",
tagClose : "}\}<\/ref>",
speedTip : wgULS('引用书籍','引用書籍'),
});
addEditButton("btnReferencesNew",{
src : "2/2c/Button_cite_news.png",
tagOpen : '<ref name="">{\{cite news | language = | author = | coauthors = | url = | title = | work = | publisher = | pages = | date = | accessdate = ',
sampleText : "",
tagClose : "}\}<\/ref>",
speedTip : wgULS('引用新闻','引用新聞'),
});
addEditButton('btnWelcome',{
src : "2/23/Pulsante_grazie.png",
tagOpen : '{\{subst:welcome',
sampleText : "",
tagClose : '}\}',
speedTip : "歡迎用戶"
});
addEditButton('btnWelcomeIP',{
src : "1/1c/Button_smiley_face_smile.png",
tagOpen : '{\{welcomeip',
sampleText : "",
tagClose : '}\}',
speedTip : "歡迎匿名用戶"
});
addEditButton('btnSupport',{
src : "6/60/Button_support.png",
tagOpen : '{\{support}\}',
sampleText : "",
tagClose : '',
speedTip : "投票支持",
summary : "Support"
});
addEditButton('btnOppose',{
src : "9/98/Button_oppose.png",
tagOpen : '{\{oppose}\}',
sampleText : "",
tagClose : '',
speedTip : "投票反對",
summary : "Oppose"
});
addEditButton('btnNeutre',{
src : "4/4e/Button_neutre.png",
tagOpen : '{\{中立}\}',
sampleText : "",
tagClose : '',
speedTip : "投票中立",
summary : "Neutre"
});
addEditButton('btnComment',{
src : "b/b4/Button_opinion.png",
tagOpen : '{\{意見}\}',
sampleText : "",
tagClose : '',
speedTip : "投票意見"
});
addEditButton('btnKeep',{
src : "a/a0/Button_keep.png",
tagOpen : '{\{保留}\}',
sampleText : "",
tagClose : "",
speedTip : "投票保留",
summary : "Keep"
});
addEditButton('btnDelete',{
src : "1/13/Button_delete.png",
tagOpen : '{\{刪除}\}',
sampleText : "",
tagClose : '',
speedTip : "投票刪除",
summary : "Delete"
});
addEditButton('btnOrz',{
src : "4/4b/Button_XD.PNG",
tagOpen : "{\{囧}\}",
sampleText : "",
tagClose : '',
speedTip : "囧爆了"
});
addEditButton('btnCopyvio',{
src : "7/72/Button_copy_vio_plagio.png",
tagOpen : "\n{\{subst:Copyvio/auto|url=",
sampleText : "*http://url1\n*http://url2\n*http://url3",
tagClose : "}\}\n",
speedTip : "標示侵權",
summary : "copyvio"
});
addEditButton('btnCopyvioNotice',{
src : "d/d3/Button_copyvio_discuss.png",
tagOpen : '{\{subst:User:XiaoZhou/Template/新条目侵权|',
sampleText : '条目|sign=~~~~',
tagClose : '}\}\n',
speedTip : "侵權通知",
summary : "copyvionotice"
});
addEditButton('btnCopyvioWarn',{
src : "c/c9/Button_copy_vio.png",
tagOpen : '{\{subst:Uw-copyright|',
sampleText : '條目',
tagClose : '|謝謝您的留意。}\}—~~\~~\n',
speedTip : "侵權警告",
summary : "copyviowarning"
});
addDropdownMenu("ArticleTags","問題條目",[
{
id : "Wikify",
text : "維基化",
summary : "Wikify",
tagOpen : "{\{subst:Wikify/auto}\}",
tagClose : "\n"
},
{
id : "POV",
text : "內容不中立",
summary : "POV",
tagOpen : "{\{subst:POV/auto}\}",
tagClose : "\n"
},
{
id : "Clean",
text : "需要清理",
summary : "Cleanup",
tagOpen : "{\{subst:Cleanup/auto}\}",
tagClose : "\n"
},
{
id : "Unrefer",
text : "沒有參考資料",
summary : "Unreferenced",
tagOpen : "{\{subst:Unreferenced/auto}\}",
tagClose : "\n"
},
{
id : "Fame",
text : "知名度",
summary : "Fame",
tagOpen : "{\{Subst:Notability/auto}\}",
tagClose : "\n"
},
{
id : "subStub",
text : "小小作品",
summary : "Substub",
tagOpen : "{\{Subst:Substub/auto}\}",
tagClose : "\n"
},
{
id : "notTrans",
text : "未翻譯",
summary : "Not Translated",
tagOpen : "{\{Subst:NotMandarin/auto}\}",
tagClose : "\n"
}
]);
addDropdownMenu("articleMaintenance","頁面維護",[
{
id : "inuse",
text : "正在編輯",
tagOpen : "{\{Inuse}\}",
sampleText : "",
tagClose : ""
},
{
id : "Unreferenced",
text : "缺少參考文獻",
tagOpen : "{\{subst:Unreferenced/auto}\}",
sampleText : "",
tagClose : ""
},
{
id : "mergeto",
text : "合併本條目到",
tagOpen : "{\{mergeto|",
sampleText : "合併指向",
tagClose : "}\}"
},
{
id : "mergefrom",
text : "合併到本條目",
tagOpen : "{\{mergefrom|",
sampleText : "被合併條目",
tagClose : "}\}"
},
{
id : "split",
text : "分拆條目",
tagOpen : "{\{Split}\}",
sampleText : "",
tagClose : ""
},
{
id : "translation",
text : "正在翻譯",
tagOpen : "{\{translation|tfrom=",
sampleText : "來源條目",
tagClose : "|tpercent=翻譯進度百分數}\}"
}
]);