From 7a446f7b8e9d4162d8e81eb863e151ef0ab66554 Mon Sep 17 00:00:00 2001 From: Vijay A Date: Wed, 8 Sep 2021 19:27:23 +0530 Subject: refactor: use the exposed methods for session handling from the main repo --- recipes/googlemeet/package.json | 2 +- recipes/googlemeet/webview.js | 10 ++++------ 2 files changed, 5 insertions(+), 7 deletions(-) (limited to 'recipes/googlemeet') diff --git a/recipes/googlemeet/package.json b/recipes/googlemeet/package.json index 9cab8dd..55cc0b8 100644 --- a/recipes/googlemeet/package.json +++ b/recipes/googlemeet/package.json @@ -1,7 +1,7 @@ { "id": "googlemeet", "name": "Google Meet", - "version": "2.2.0", + "version": "2.2.1", "license": "MIT", "config": { "serviceURL": "https://meet.google.com", 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 = () => { } }; -module.exports = Ferdi => { - const { session } = Ferdi.getCurrentWebContents(); - session.flushStorageData(); - session.clearStorageData({ - storages: ['serviceworkers'], - }); +window.addEventListener('beforeunload', async () => { + Ferdi.clearStorageData(['serviceworkers']); +}); +module.exports = Ferdi => { const getMessages = function getMessages() { const elements = document.querySelectorAll('.CxUIE, .unread'); let count = 0; -- cgit v1.2.3-70-g09d2