From ee5695b4e9c56a05e2d837f397bdd6df9aeabc62 Mon Sep 17 00:00:00 2001 From: iconeb Date: Wed, 23 Aug 2023 17:58:33 +0200 Subject: Allow gchat login page (#403) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: André Oliveira Co-authored-by: Vijay A --- recipes/hangoutschat/webview.js | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'recipes/hangoutschat/webview.js') diff --git a/recipes/hangoutschat/webview.js b/recipes/hangoutschat/webview.js index 75c53d0..7f2acf2 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'; -- cgit v1.2.3-70-g09d2