User:Cdip150/customEdittools.js
外观
注意:保存之后,你必须清除浏览器缓存才能看到做出的更改。Google Chrome、Firefox、Microsoft Edge及Safari:按住⇧ Shift键并单击工具栏的“刷新”按钮。参阅Help:绕过浏览器缓存以获取更多帮助。
// 更換「短簽名」按鈕
mwCustomEditButtons.remove(mwCustomEditButtons['btnSigOnly']);
mwCustomEditButtons.insert( createEditButton('btnMyShortSign',{
src : '6/6d/Button_sig.png',
tagOpen : '—{\{subst:User:Cdip150\/sign|short}\} ~~\~~\~',
sampleText : '',
tagClose : '',
speedTip : '短簽名',
width : 12
}) , mwCustomEditButtons['btnSignature']);
//加入「歡迎新手」按鈕
mwCustomEditButtons.insert( createEditButton('btnWelcome',{
src : '8/8d/Smiley_head_happy.svg',
tagOpen : '{\{subst:welcome|sign=<br /> ~~\~~}\}',
sampleText : '',
tagClose : '',
speedTip : '歡迎新手'
}) , mwCustomEditButtons['btnReferences'], "after");
// 載入「澳門條目專用編輯工具」
importScript('User:Cdip150/工具/介面/MacauEditTool.js');
// 延長編輯摘要的字數限制
function setLongSummary(){
if(!document.getElementById("wpSummary")){
setTimeout(setLongSummary,1000);
}else if(!document.getElementById("wpSummary").maxLength){
setTimeout(setLongSummary,1000);
}else if(document.getElementById("wpSummary").maxLength<1000){
document.getElementById("wpSummary").maxLength=10000;
}
}
setLongSummary();