User:Cyde/monobook.js/dates.js: Difference between revisions

Content deleted Content added
Cyde (talk | contribs)
Copying over latest from Bobblewik
Cyde (talk | contribs)
Removing as of dates, changing tab to "dates2"
Line 1:
function formatdates() {
var txt = document.editform.wpTextbox1;
 
//as of
txt.value = txt.value.replace(/\[\[(as of \d{1,4})\]\]/gi, '$1');
 
// century
Line 100 ⟶ 103:
addOnloadHook(function () {
if(document.forms.editform) {
addLink('p-cactions', 'javascript:formatdates()', 'datestestdates2', 'ca-datefixer', 'Fixes some date formatting', '', '');
}
});