Skip to content

Commit

Permalink
Allow gchat login page (#403)
Browse files Browse the repository at this point in the history
Co-authored-by: André Oliveira <[email protected]>
Co-authored-by: Vijay A <[email protected]>
  • Loading branch information
3 people committed Aug 23, 2023
1 parent 2cb0b1a commit ee5695b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion recipes/hangoutschat/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "hangoutschat",
"name": "Hangouts Chat",
"version": "1.7.0",
"version": "1.8.0",
"license": "MIT",
"aliases": [
"google-chat",
Expand Down
9 changes: 9 additions & 0 deletions recipes/hangoutschat/webview.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down

0 comments on commit ee5695b

Please sign in to comment.