User:Ohconfucius/test/MOSNUM dates.js: Difference between revisions

Content deleted Content added
testing
add hello driver
Line 35:
script: ohc_abbrev_all_dates
},
/*{
name: "Expand all datesHelll===o",
tooltip: "Expandsay month names throughouthello",
script: ohc_expand_all_dates_driverohc_hello_driver
},*/
{
name: "US-slash dates",
Line 808:
// replace ISO dates (within parentheses) only within refs
.ohc_regex(/(<ref[^>]*>[^<]+?)([ ]\()@YYYY-@MM-@DD(\))(\W[^<]*?<\/ref>)/gi, "$1$2@Month @Day, @YYYY$3$4");
}
 
function ohc_hello_driver(editor) {
editor
// Add a tag to the summary box
.replace(/(\{\{use (?:mdy|dmy) dates)(?:\|cs1-dates=\w{1,2}\s*|)(?=\}\})/gi, "$1|cs1-dates=y$2"); // conversion of mdy dates
ohc_MOSNUM_edit_summary(editor);
}