diff --git a/CHANGELOG.md b/CHANGELOG.md index be9bceec0c..e1898fc8b3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,7 +19,7 @@ _This release is scheduled to be released on 2024-01-01._ ### Removed - Removed Codecov workflow (not working anymore, other workflow required) (#3107) -- Removed titleReplace from calendar, replaced + extended by customEvents (backward compatibility included) +- Removed titleReplace from calendar, replaced + extended by customEvents (backward compatibility included) (#3249) - Removed failing unit test (#3254) ### Updated diff --git a/modules/default/calendar/calendar.js b/modules/default/calendar/calendar.js index 6f1c98d91a..ed2322bb58 100644 --- a/modules/default/calendar/calendar.js +++ b/modules/default/calendar/calendar.js @@ -28,6 +28,7 @@ Module.register("calendar", { fetchInterval: 60 * 60 * 1000, // Update every hour animationSpeed: 2000, fade: true, + fadePoint: 0.25, // Start on 1/4th of the list. urgency: 7, timeFormat: "relative", dateFormat: "MMM Do", @@ -35,14 +36,12 @@ Module.register("calendar", { fullDayEventDateFormat: "MMM Do", showEnd: false, getRelative: 6, - fadePoint: 0.25, // Start on 1/4th of the list. hidePrivate: false, hideOngoing: false, hideTime: false, hideDuplicates: true, showTimeToday: false, colored: false, - customEvents: [], // Array of {keyword: "", symbol: "", color: "", eventClass: ""} where Keyword is a regexp and symbol/color/eventClass are to be applied for matched tableClass: "small", calendars: [ { @@ -50,10 +49,11 @@ Module.register("calendar", { url: "https://www.calendarlabs.com/templates/ical/US-Holidays.ics" } ], - titleReplace: { - "De verjaardag van ": "", - "'s birthday": "" - }, + customEvents: [ + // Array of {keyword: "", symbol: "", color: "", eventClass: ""} where Keyword is a regexp and symbol/color/eventClass are to be applied for matched + { keyword: ".*", transform: { search: "De verjaardag van ", replace: "" } }, + { keyword: ".*", transform: { search: "'s birthday", replace: "" } } + ], locationTitleReplace: { "street ": "" }, @@ -143,7 +143,7 @@ Module.register("calendar", { // we check user and password here for backwards compatibility with old configs if (calendar.user && calendar.pass) { Log.warn("Deprecation warning: Please update your calendar authentication configuration."); - Log.warn("https://github.com/MichMich/MagicMirror/tree/v2.1.2/modules/default/calendar#calendar-authentication-options"); + Log.warn("https://docs.magicmirror.builders/modules/calendar.html#configuration-options"); calendar.auth = { user: calendar.user, pass: calendar.pass