跳转到内容

User:Cdip150/customEdittools.js

维基百科,自由的百科全书

这是本页的一个历史版本,由Cdip150留言 | 贡献2008年2月21日 (四) 17:47编辑。这可能和当前版本存在着巨大的差异。

注意:保存之后,你必须清除浏览器缓存才能看到做出的更改。Google ChromeFirefoxMicrosoft EdgeSafari:按住⇧ 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();