aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/moodle
diff options
context:
space:
mode:
authorLibravatar Vijay A <vraravam@users.noreply.github.com>2022-04-18 06:51:50 -0500
committerLibravatar Vijay A <vraravam@users.noreply.github.com>2022-04-18 06:51:50 -0500
commit18801ed0c02627e87639dc0848cab44dacc18be2 (patch)
tree15e56ba66c68bf7b4594e6c9fdef44e037b4be31 /recipes/moodle
parentRemove deprecated webPreference flag (diff)
downloadferdium-recipes-18801ed0c02627e87639dc0848cab44dacc18be2.tar.gz
ferdium-recipes-18801ed0c02627e87639dc0848cab44dacc18be2.tar.zst
ferdium-recipes-18801ed0c02627e87639dc0848cab44dacc18be2.zip
Rebranded from 'ferdi' to 'ferdium' (companion changes for the main repo PR #2)
Diffstat (limited to 'recipes/moodle')
-rw-r--r--recipes/moodle/README.md4
-rw-r--r--recipes/moodle/index.js2
-rw-r--r--recipes/moodle/package.json2
-rw-r--r--recipes/moodle/webview.js8
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
2This is a Ferdi recipe for Moodle 2This is a Ferdium recipe for Moodle
3 3
4This 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. 4This 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 @@
1module.exports = Ferdi => { 1module.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};