diff options
author | 2021-09-08 19:27:23 +0530 | |
---|---|---|
committer | 2021-09-08 19:49:43 +0530 | |
commit | 7a446f7b8e9d4162d8e81eb863e151ef0ab66554 (patch) | |
tree | 2bd7794fb5080ad16d44420bc1f94ca2638435b7 /recipes/googlemeet/webview.js | |
parent | execute prepare script with npx to avoid missing husky dependency error (#676) (diff) | |
download | ferdium-recipes-7a446f7b8e9d4162d8e81eb863e151ef0ab66554.tar.gz ferdium-recipes-7a446f7b8e9d4162d8e81eb863e151ef0ab66554.tar.zst ferdium-recipes-7a446f7b8e9d4162d8e81eb863e151ef0ab66554.zip |
refactor: use the exposed methods for session handling from the main repo
Diffstat (limited to 'recipes/googlemeet/webview.js')
-rw-r--r-- | recipes/googlemeet/webview.js | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/recipes/googlemeet/webview.js b/recipes/googlemeet/webview.js index d6a29fe..9d334ba 100644 --- a/recipes/googlemeet/webview.js +++ b/recipes/googlemeet/webview.js | |||
@@ -10,13 +10,11 @@ window.onload = () => { | |||
10 | } | 10 | } |
11 | }; | 11 | }; |
12 | 12 | ||
13 | module.exports = Ferdi => { | 13 | window.addEventListener('beforeunload', async () => { |
14 | const { session } = Ferdi.getCurrentWebContents(); | 14 | Ferdi.clearStorageData(['serviceworkers']); |
15 | session.flushStorageData(); | 15 | }); |
16 | session.clearStorageData({ | ||
17 | storages: ['serviceworkers'], | ||
18 | }); | ||
19 | 16 | ||
17 | module.exports = Ferdi => { | ||
20 | const getMessages = function getMessages() { | 18 | const getMessages = function getMessages() { |
21 | const elements = document.querySelectorAll('.CxUIE, .unread'); | 19 | const elements = document.querySelectorAll('.CxUIE, .unread'); |
22 | let count = 0; | 20 | let count = 0; |