User:JJPMaster/Scripts/fixaccessdate.js: Difference between revisions

Content deleted Content added
Created page with 'function correctText(text) { return text.replace(/|(access-date|date)=(\d{2})\/(\d{2})\/(\d{4})/g, (match, key, mm, dd, yyyy) => { const months = [ "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" ]; const monthName = months[parseInt(mm, 10) - 1]; return `${key}=${monthName} ${parseInt(dd, 10)}, ${yyyy}`; }); } function getPageContent(name) { va...'
 
No edit summary
Line 36:
$(() => {
var portletLink = mw.util.addPortletLink('p-cactions', '#', 'Fix access dates', 'ca-fixaccessdate', 'Use a script to fix the access-date and date parameters of citation templates', '');
$(portletLink).click(doTheEdit());
});