diff options
Diffstat (limited to 'recipes/hangoutschat/webview.js')
-rw-r--r-- | recipes/hangoutschat/webview.js | 9 |
1 files changed, 9 insertions, 0 deletions
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) { | |||
5 | const _path = _interopRequireDefault(require('path')); | 5 | const _path = _interopRequireDefault(require('path')); |
6 | 6 | ||
7 | module.exports = Ferdium => { | 7 | module.exports = Ferdium => { |
8 | // if the user is on googlechat landing page, go to the login page. | ||
9 | if ( | ||
10 | location.hostname === 'workspace.google.com' && | ||
11 | location.href.includes('products/chat/') | ||
12 | ) { | ||
13 | location.href = | ||
14 | 'https://accounts.google.com/AccountChooser?continue=https://chat.google.com/?referrer=2'; | ||
15 | } | ||
16 | |||
8 | // class corresponding to the red badge that is visible for direct messages | 17 | // class corresponding to the red badge that is visible for direct messages |
9 | const directMessageSelector = 'div.V6.CL.su.ahD.X9.Y2 span.akt span.XU'; | 18 | const directMessageSelector = 'div.V6.CL.su.ahD.X9.Y2 span.akt span.XU'; |
10 | 19 | ||