From be1bdd785b7ba739ea6c51c2d960499b04052501 Mon Sep 17 00:00:00 2001 From: Lukas Svicarovic Date: Mon, 3 Apr 2023 20:18:31 -0400 Subject: Fix Google Calendar landing page (#329) --- recipes/googlecalendar/package.json | 2 +- recipes/googlecalendar/webview.js | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) (limited to 'recipes/googlecalendar') diff --git a/recipes/googlecalendar/package.json b/recipes/googlecalendar/package.json index 918f460..f6232cb 100644 --- a/recipes/googlecalendar/package.json +++ b/recipes/googlecalendar/package.json @@ -1,7 +1,7 @@ { "id": "googlecalendar", "name": "Google Calendar", - "version": "2.3.1", + "version": "2.3.2", "license": "MIT", "aliases": [ "google-calendar", 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')); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } module.exports = Ferdium => { + // if the user is on googlecalendar landing page, go to the login page. + if ( + location.hostname == 'workspace.google.com' && + location.href.includes('products/calendar/') + ) { + location.href = + 'https://accounts.google.com/AccountChooser?continue=https://calendar.google.com/u/0/'; + } Ferdium.injectCSS(_path.default.join(__dirname, 'calendar.css')); Ferdium.injectJSUnsafe(_path.default.join(__dirname, 'webview-unsafe.js')); }; -- cgit v1.2.3-70-g09d2