aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/googlecalendar/webview.js
diff options
context:
space:
mode:
authorLibravatar Lukas Svicarovic <lsvicarovic@uc.cl>2023-04-03 20:18:31 -0400
committerLibravatar GitHub <noreply@github.com>2023-04-04 01:18:31 +0100
commitbe1bdd785b7ba739ea6c51c2d960499b04052501 (patch)
treedc693bef7ba428fc78975bd0317a6dfb4cf9a5f1 /recipes/googlecalendar/webview.js
parentUpgrade 'npm' to '18.15.0' and 'pnpm' to 7.30.0' (diff)
downloadferdium-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.js8
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'));
3function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 3function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
4 4
5module.exports = Ferdium => { 5module.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};