User:Kimchi.sg/simple.js
出自維基百科,自由嘅百科全書
註:㩒儲存之後,你可能要清埋瀏覽器快取 (browser cache) 先至可以睇到變化。方法:Mozilla / Firefox / Safari:㩒Shift加重新載入,或者Ctrl-Shift-R (Apple Mac 嘅 Cmd-Shift-R); IE: 㩒Ctrl加重新整理 或者 Ctrl-F5; Konqueror: 重新整理 或者 F5; Opera 就要開 Tools→Preferences 來清。
// [[User:Lupin/popups.js]] - please include this line document.write('<script type="text/javascript" src="http://en.wikipedia.org/w/index.php?title=User:Lupin/popups.js&action=raw&ctype=text/javascript&dontcountme=s"></script>'); // Options are explained at [[Wikipedia:Tools/Navigation_popups]] popupFixDabs=true; popupFixRedirs=true; /* Force add edit summary */ function addForceSummary() { if(!/&action=edit/.test(window.location.href) && !/&action=submit/.test(window.location.href)) return; if(/§ion=new/.test(window.location.href)) return; if(!document.forms.editform) return; document.forms.editform.wpSave.onclick = forceSummary; } function forceSummary() { if(!document.forms.editform.wpSummary.value.replace(/^(?:\/\\*.*\\*\/)? *(.*) *$/,'$1')) { var r = prompt('Are you sure you want to submit without adding a summary?\nTo add a summary, type it in the box below:',document.forms.editform.wpSummary.value); if(r == null) { return false; } document.forms.editform.wpSummary.value = r; } return true; } addOnloadHook(addForceSummary);