diff options
author | 2020-11-15 13:00:51 -0600 | |
---|---|---|
committer | 2020-11-15 13:00:51 -0600 | |
commit | f1f9a695b68a77625f4abc885e4570eb51331275 (patch) | |
tree | 79a4816d356b225d3e0a75fbaae8959d50bc6d71 /recipes/googleclassroom/webview.js | |
parent | Merge pull request #354 from eandersons/nextcloud-talk (diff) | |
download | ferdium-recipes-f1f9a695b68a77625f4abc885e4570eb51331275.tar.gz ferdium-recipes-f1f9a695b68a77625f4abc885e4570eb51331275.tar.zst ferdium-recipes-f1f9a695b68a77625f4abc885e4570eb51331275.zip |
Add Google Classroom recipe
Google Classroom with DarkMode supp
Diffstat (limited to 'recipes/googleclassroom/webview.js')
-rw-r--r-- | recipes/googleclassroom/webview.js | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/recipes/googleclassroom/webview.js b/recipes/googleclassroom/webview.js new file mode 100644 index 0000000..c53fe10 --- /dev/null +++ b/recipes/googleclassroom/webview.js | |||
@@ -0,0 +1,17 @@ | |||
1 | "use strict"; | ||
2 | |||
3 | module.exports = Franz => { | ||
4 | const getMessages = function getMessages() { | ||
5 | var homework = 0 | ||
6 | const upcomingAssignment = document.getElementsByClassName('hrUpcomingAssignmentGroup') | ||
7 | if (upcomingAssignment.length != 0) { | ||
8 | var i; | ||
9 | for (i = 0; i < upcomingAssignment.length; i++) { | ||
10 | homework += upcomingAssignment[i].childElementCount; | ||
11 | } | ||
12 | } | ||
13 | Franz.setBadge(parseInt(homework, 10)); | ||
14 | }; | ||
15 | |||
16 | Franz.loop(getMessages); | ||
17 | }; \ No newline at end of file | ||