diff options
Diffstat (limited to 'recipes')
-rw-r--r-- | recipes/googleclassroom/package.json | 2 | ||||
-rw-r--r-- | recipes/googleclassroom/webview.js | 9 |
2 files changed, 10 insertions, 1 deletions
diff --git a/recipes/googleclassroom/package.json b/recipes/googleclassroom/package.json index eae94b3..8680db8 100644 --- a/recipes/googleclassroom/package.json +++ b/recipes/googleclassroom/package.json | |||
@@ -1,7 +1,7 @@ | |||
1 | { | 1 | { |
2 | "id": "googleclassroom", | 2 | "id": "googleclassroom", |
3 | "name": "Google Classroom", | 3 | "name": "Google Classroom", |
4 | "version": "1.2.1", | 4 | "version": "1.2.2", |
5 | "license": "MIT", | 5 | "license": "MIT", |
6 | "repository": "https://github.com/TanZng/ferdi-googleclassroom", | 6 | "repository": "https://github.com/TanZng/ferdi-googleclassroom", |
7 | "config": { | 7 | "config": { |
diff --git a/recipes/googleclassroom/webview.js b/recipes/googleclassroom/webview.js index 15ab671..5035417 100644 --- a/recipes/googleclassroom/webview.js +++ b/recipes/googleclassroom/webview.js | |||
@@ -1,4 +1,13 @@ | |||
1 | module.exports = Ferdium => { | 1 | module.exports = Ferdium => { |
2 | // if the user is on googleclassroom landing page, go to the login page. | ||
3 | if ( | ||
4 | location.hostname == 'edu.google.com' && | ||
5 | location.href.includes('workspace-for-education/classroom/') | ||
6 | ) { | ||
7 | location.href = | ||
8 | 'https://accounts.google.com/AccountChooser?continue=https://classroom.google.com/u/0/'; | ||
9 | } | ||
10 | |||
2 | const getMessages = () => { | 11 | const getMessages = () => { |
3 | let homework = 0; | 12 | let homework = 0; |
4 | const upcomingAssignment = document.querySelectorAll('.hrUpcomingAssignmentGroup'); | 13 | const upcomingAssignment = document.querySelectorAll('.hrUpcomingAssignmentGroup'); |