From a8b31053b1baf13f2fa943ce90ef454bd0d6d494 Mon Sep 17 00:00:00 2001 From: iconeb Date: Thu, 17 Aug 2023 18:55:54 +0200 Subject: [PATCH] Allow gchat login page Add reference to workspace.google.com to redirect to login page --- recipes/hangoutschat/webview.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/recipes/hangoutschat/webview.js b/recipes/hangoutschat/webview.js index 75c53d059..c5c487ace 100644 --- a/recipes/hangoutschat/webview.js +++ b/recipes/hangoutschat/webview.js @@ -5,6 +5,15 @@ function _interopRequireDefault(obj) { const _path = _interopRequireDefault(require('path')); module.exports = Ferdium => { + // if the user is on googlechat landing page, go to the login page. + if ( + location.hostname === 'workspace.google.com' && + location.href.includes('products/chat/') + ) { + location.href = + 'https://accounts.google.com/AccountChooser?continue=https://chat.google.com/?referrer=2'; + } + // class corresponding to the red badge that is visible for direct messages const directMessageSelector = 'div.V6.CL.su.ahD.X9.Y2 span.akt span.XU';