Content deleted Content added
Latest from Bobblewik |
Latest from Bobblewik |
||
Line 1:
//'winc' function allows buttons to be added toolbar
winc('User:Omegatron/monobook.js/addlink.js');
function formatdates() {
var txt = document.editform.wpTextbox1;
Line 13 ⟶ 17:
// piped decades and years
txt.value = txt.value.replace(/\[\[(\d{1,4}\'?s)\]\]/gi, '$1');
txt.value = txt.value.replace(/\[\[(\d{1,4}s? (?:AD|BC|CE|BCE))\]\]/gi, '$1');
txt.value = txt.value.replace(/\[\[\d{1,4}s? (?:AD|BC|CE|BCE)\|(\d{1,4})\]\]/gi, '$1');
Line 135 ⟶ 139:
var txt = document.editform.wpSummary;
//Made summary more accurate: not all links are removed. Keep summary brief
var summary = "Revising date links
if (txt.value.indexOf(summary) == -1) {
if (txt.value.match(/[^\*\/\s][^\/\s]?\s*$/)) {
|