diff --git a/MMM-JokeAPI.js b/MMM-JokeAPI.js index a374224..0f5a6c1 100644 --- a/MMM-JokeAPI.js +++ b/MMM-JokeAPI.js @@ -1,6 +1,8 @@ Module.register("MMM-JokeAPI", { defaults: { - category: "Programming", + lang: "en", + category: "Any", + blacklistFlags: "", fetchInterval: 10 * 1000 }, getStyles() { @@ -48,7 +50,7 @@ Module.register("MMM-JokeAPI", { } }, getJoke() { - fetch(`https://sv443.net/jokeapi/v2/joke/${this.config.category}`).then((response) => { + fetch(`https://v2.jokeapi.dev/joke/${this.config.category}?lang=${this.config.lang}&blacklistFlags=${this.config.blacklistFlags}`).then((response) => { response.json().then((joke) => { this.joke = joke; this.updateDom(); diff --git a/README.md b/README.md index fdff507..4fdfb43 100644 --- a/README.md +++ b/README.md @@ -5,11 +5,14 @@ This is a module for `MagicMirror²`; the purpose of the module is to show you j 1. Clone this repository into your MagicMirror `modules` folder. 2. Edit your configuration file under `config/config.js` with the following configuration. ``` +// https://jokeapi.dev { module: 'MMM-JokeAPI', position: 'middle_center', config: { - category: "Programming" + lang: "de", + category: "Programming,Miscellaneous", + blacklistFlags: "nsfw" } } ```