From 18801ed0c02627e87639dc0848cab44dacc18be2 Mon Sep 17 00:00:00 2001 From: Vijay A Date: Mon, 18 Apr 2022 06:51:50 -0500 Subject: Rebranded from 'ferdi' to 'ferdium' (companion changes for the main repo PR #2) --- recipes/moodle/README.md | 4 ++-- recipes/moodle/index.js | 2 +- recipes/moodle/package.json | 2 +- recipes/moodle/webview.js | 8 ++++---- 4 files changed, 8 insertions(+), 8 deletions(-) (limited to 'recipes/moodle') 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 @@ -# Moodle for Ferdi -This is a Ferdi recipe for Moodle +# Moodle for Ferdium +This is a Ferdium recipe for Moodle 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 @@ { "id": "moodle", "name": "Moodle", - "version": "1.0.1", + "version": "1.1.0", "license": "MIT", "config": { "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 @@ -module.exports = Ferdi => { +module.exports = Ferdium => { const getMessages = () => { const directCountSelector = [...document.querySelectorAll('[data-region="count-container"]')]; const totalMessageCount = directCountSelector.reduce( - ((count, item) => count + Ferdi.safeParseInt(item.textContent)), + ((count, item) => count + Ferdium.safeParseInt(item.textContent)), 0 ); - Ferdi.setBadge(totalMessageCount, 0); + Ferdium.setBadge(totalMessageCount, 0); }; - Ferdi.loop(getMessages); + Ferdium.loop(getMessages); }; -- cgit v1.2.3-70-g09d2