diff options
Diffstat (limited to 'recipes/moodle')
-rw-r--r-- | recipes/moodle/README.md | 4 | ||||
-rw-r--r-- | recipes/moodle/index.js | 2 | ||||
-rw-r--r-- | recipes/moodle/package.json | 2 | ||||
-rw-r--r-- | recipes/moodle/webview.js | 8 |
4 files changed, 8 insertions, 8 deletions
diff --git a/recipes/moodle/README.md b/recipes/moodle/README.md index 1c85a88..979980e 100644 --- a/recipes/moodle/README.md +++ b/recipes/moodle/README.md | |||
@@ -1,4 +1,4 @@ | |||
1 | # Moodle for Ferdi | 1 | # Moodle for Ferdium |
2 | This is a Ferdi recipe for Moodle | 2 | This is a Ferdium recipe for Moodle |
3 | 3 | ||
4 | This recipe is designed to work with the default moodle Theme. If your Moodle uses a different theme, this recipe might not be able to show an unread messages count as the CSS selectors differ. | 4 | This recipe is designed to work with the default moodle Theme. If your Moodle uses a different theme, this recipe might not be able to show an unread messages count as the CSS selectors differ. |
diff --git a/recipes/moodle/index.js b/recipes/moodle/index.js index 0a5cedb..dd41f72 100644 --- a/recipes/moodle/index.js +++ b/recipes/moodle/index.js | |||
@@ -1 +1 @@ | |||
module.exports = Ferdi => class moodle extends Ferdi {}; | module.exports = Ferdium => Ferdium; | ||
diff --git a/recipes/moodle/package.json b/recipes/moodle/package.json index 109a197..e661884 100644 --- a/recipes/moodle/package.json +++ b/recipes/moodle/package.json | |||
@@ -1,7 +1,7 @@ | |||
1 | { | 1 | { |
2 | "id": "moodle", | 2 | "id": "moodle", |
3 | "name": "Moodle", | 3 | "name": "Moodle", |
4 | "version": "1.0.1", | 4 | "version": "1.1.0", |
5 | "license": "MIT", | 5 | "license": "MIT", |
6 | "config": { | 6 | "config": { |
7 | "hasCustomUrl": true | 7 | "hasCustomUrl": true |
diff --git a/recipes/moodle/webview.js b/recipes/moodle/webview.js index 6439c2c..2ac7aa4 100644 --- a/recipes/moodle/webview.js +++ b/recipes/moodle/webview.js | |||
@@ -1,12 +1,12 @@ | |||
1 | module.exports = Ferdi => { | 1 | module.exports = Ferdium => { |
2 | const getMessages = () => { | 2 | const getMessages = () => { |
3 | const directCountSelector = [...document.querySelectorAll('[data-region="count-container"]')]; | 3 | const directCountSelector = [...document.querySelectorAll('[data-region="count-container"]')]; |
4 | const totalMessageCount = directCountSelector.reduce( | 4 | const totalMessageCount = directCountSelector.reduce( |
5 | ((count, item) => count + Ferdi.safeParseInt(item.textContent)), | 5 | ((count, item) => count + Ferdium.safeParseInt(item.textContent)), |
6 | 0 | 6 | 0 |
7 | ); | 7 | ); |
8 | 8 | ||
9 | Ferdi.setBadge(totalMessageCount, 0); | 9 | Ferdium.setBadge(totalMessageCount, 0); |
10 | }; | 10 | }; |
11 | Ferdi.loop(getMessages); | 11 | Ferdium.loop(getMessages); |
12 | }; | 12 | }; |