diff options
author | 2023-04-03 20:18:31 -0400 | |
---|---|---|
committer | 2023-04-04 01:18:31 +0100 | |
commit | be1bdd785b7ba739ea6c51c2d960499b04052501 (patch) | |
tree | dc693bef7ba428fc78975bd0317a6dfb4cf9a5f1 /recipes/googlecalendar/webview.js | |
parent | Upgrade 'npm' to '18.15.0' and 'pnpm' to 7.30.0' (diff) | |
download | ferdium-recipes-be1bdd785b7ba739ea6c51c2d960499b04052501.tar.gz ferdium-recipes-be1bdd785b7ba739ea6c51c2d960499b04052501.tar.zst ferdium-recipes-be1bdd785b7ba739ea6c51c2d960499b04052501.zip |
Fix Google Calendar landing page (#329)
Diffstat (limited to 'recipes/googlecalendar/webview.js')
-rw-r--r-- | recipes/googlecalendar/webview.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/recipes/googlecalendar/webview.js b/recipes/googlecalendar/webview.js index ef03ce2..9937bec 100644 --- a/recipes/googlecalendar/webview.js +++ b/recipes/googlecalendar/webview.js | |||
@@ -3,6 +3,14 @@ const _path = _interopRequireDefault(require('path')); | |||
3 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | 3 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } |
4 | 4 | ||
5 | module.exports = Ferdium => { | 5 | module.exports = Ferdium => { |
6 | // if the user is on googlecalendar landing page, go to the login page. | ||
7 | if ( | ||
8 | location.hostname == 'workspace.google.com' && | ||
9 | location.href.includes('products/calendar/') | ||
10 | ) { | ||
11 | location.href = | ||
12 | 'https://accounts.google.com/AccountChooser?continue=https://calendar.google.com/u/0/'; | ||
13 | } | ||
6 | Ferdium.injectCSS(_path.default.join(__dirname, 'calendar.css')); | 14 | Ferdium.injectCSS(_path.default.join(__dirname, 'calendar.css')); |
7 | Ferdium.injectJSUnsafe(_path.default.join(__dirname, 'webview-unsafe.js')); | 15 | Ferdium.injectJSUnsafe(_path.default.join(__dirname, 'webview-unsafe.js')); |
8 | }; | 16 | }; |