diff options
Diffstat (limited to 'recipes/lastpass')
-rw-r--r-- | recipes/lastpass/package.json | 2 | ||||
-rw-r--r-- | recipes/lastpass/webview.js | 17 |
2 files changed, 4 insertions, 15 deletions
diff --git a/recipes/lastpass/package.json b/recipes/lastpass/package.json index cf08063..75632bd 100644 --- a/recipes/lastpass/package.json +++ b/recipes/lastpass/package.json | |||
@@ -1,7 +1,7 @@ | |||
1 | { | 1 | { |
2 | "id": "lastpass", | 2 | "id": "lastpass", |
3 | "name": "LastPass", | 3 | "name": "LastPass", |
4 | "version": "2.2.0", | 4 | "version": "2.2.1", |
5 | "license": "MIT", | 5 | "license": "MIT", |
6 | "config": { | 6 | "config": { |
7 | "serviceURL": "https://lastpass.com/?ac=1&lpnorefresh=1", | 7 | "serviceURL": "https://lastpass.com/?ac=1&lpnorefresh=1", |
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 | |||
10 | window.addEventListener('beforeunload', async () => { | 11 | window.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 | ||
27 | module.exports = Ferdi => { | 16 | module.exports = Ferdi => { |