aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/lastpass/webview.js
diff options
context:
space:
mode:
Diffstat (limited to 'recipes/lastpass/webview.js')
-rw-r--r--recipes/lastpass/webview.js17
1 files changed, 3 insertions, 14 deletions
diff --git a/recipes/lastpass/webview.js b/recipes/lastpass/webview.js
index 878fa5e..4a92e0c 100644
--- a/recipes/lastpass/webview.js
+++ b/recipes/lastpass/webview.js
@@ -7,21 +7,10 @@ setTimeout(() => {
7 window.location.reload(); 7 window.location.reload();
8 } 8 }
9}, 1000); 9}, 1000);
10
10window.addEventListener('beforeunload', async () => { 11window.addEventListener('beforeunload', async () => {
11 try { 12 Ferdi.clearStorageData(['appcache', 'serviceworkers', 'cachestorage', 'websql', 'indexdb']);
12 const { session } = Ferdi.getCurrentWebContents(); 13 Ferdi.releaseServiceWorkers();
13 session.flushStorageData();
14 session.clearStorageData({
15 storages: ['appcache', 'serviceworkers', 'cachestorage', 'websql', 'indexdb'],
16 });
17 const registrations = await window.navigator.serviceWorker.getRegistrations();
18 registrations.forEach(r => {
19 r.unregister();
20 console.log('ServiceWorker unregistered');
21 });
22 } catch (err) {
23 console.err(err);
24 }
25}); 14});
26 15
27module.exports = Ferdi => { 16module.exports = Ferdi => {