diff --git a/CHANGELOG.md b/CHANGELOG.md index 718e3785..ec34b4e6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). - Installer: Use init config.js from config.js.sample. - Switched out `rrule` package for `rrule-alt` in order to improve calendar issues. (Experimental: [#565](https://github.com/MichMich/MagicMirror/issues/565)) - Make mouse events pass through the region fullscreen_above to modules below. +- Scaled the splash screen down to make it a bit more subtle. ### Added - Add loaded function to modules, providing an async callback. @@ -19,6 +20,8 @@ This project adheres to [Semantic Versioning](http://semver.org/). - Afrikaans Translation - Add postinstall script to notify user that MagicMirror installed successfully despite warnings from NPM. - Init tests using mocha. +- Option to use RegExp in Calendar's titleReplace. + ### Fixed - Update .gitignore to not ignore default modules folder. diff --git a/modules/default/calendar/calendar.js b/modules/default/calendar/calendar.js index b636b30b..53e9187c 100644 --- a/modules/default/calendar/calendar.js +++ b/modules/default/calendar/calendar.js @@ -360,7 +360,7 @@ Module.register("calendar", { /* capFirst(string) * Capitalize the first letter of a string - * Eeturn capitalized string + * Return capitalized string */ capFirst: function (string) { @@ -379,6 +379,13 @@ Module.register("calendar", { titleTransform: function (title) { for (var needle in this.config.titleReplace) { var replacement = this.config.titleReplace[needle]; + + var regParts = needle.match(/^\/(.+)\/([gim]*)$/); + if (regParts) { + // the parsed pattern is a regexp. + needle = new RegExp(regParts[1], regParts[2]); + } + title = title.replace(needle, replacement); } diff --git a/modules/default/calendar/node_helper.js b/modules/default/calendar/node_helper.js index a1b8db09..cc511659 100644 --- a/modules/default/calendar/node_helper.js +++ b/modules/default/calendar/node_helper.js @@ -12,7 +12,6 @@ var CalendarFetcher = require("./calendarfetcher.js"); module.exports = NodeHelper.create({ // Override start method. start: function() { - var self = this; var events = []; this.fetchers = []; diff --git a/splashscreen/splash.png b/splashscreen/splash.png index f3da394b..b2acc495 100644 Binary files a/splashscreen/splash.png and b/splashscreen/splash.png differ