diff options
Diffstat (limited to 'recipes/android-messages')
-rw-r--r-- | recipes/android-messages/package.json | 2 | ||||
-rw-r--r-- | recipes/android-messages/webview.js | 16 |
2 files changed, 3 insertions, 15 deletions
diff --git a/recipes/android-messages/package.json b/recipes/android-messages/package.json index 852b942..354c21d 100644 --- a/recipes/android-messages/package.json +++ b/recipes/android-messages/package.json | |||
@@ -1,7 +1,7 @@ | |||
1 | { | 1 | { |
2 | "id": "android-messages", | 2 | "id": "android-messages", |
3 | "name": "Android Messages", | 3 | "name": "Android Messages", |
4 | "version": "2.2.0", | 4 | "version": "2.2.1", |
5 | "license": "MIT", | 5 | "license": "MIT", |
6 | "config": { | 6 | "config": { |
7 | "serviceURL": "https://messages.google.com/web", | 7 | "serviceURL": "https://messages.google.com/web", |
diff --git a/recipes/android-messages/webview.js b/recipes/android-messages/webview.js index 4b57700..e1cfde4 100644 --- a/recipes/android-messages/webview.js +++ b/recipes/android-messages/webview.js | |||
@@ -7,20 +7,8 @@ setTimeout(() => { | |||
7 | }, 1000); | 7 | }, 1000); |
8 | 8 | ||
9 | window.addEventListener('beforeunload', async () => { | 9 | window.addEventListener('beforeunload', async () => { |
10 | try { | 10 | Ferdi.clearStorageData(['appcache', 'serviceworkers', 'cachestorage', 'websql', 'indexdb']); |
11 | const { session } = Ferdi.getCurrentWebContents(); | 11 | Ferdi.releaseServiceWorkers(); |
12 | session.flushStorageData(); | ||
13 | session.clearStorageData({ | ||
14 | storages: ['appcache', 'serviceworkers', 'cachestorage', 'websql', 'indexdb'], | ||
15 | }); | ||
16 | const registrations = await window.navigator.serviceWorker.getRegistrations(); | ||
17 | registrations.forEach(r => { | ||
18 | r.unregister(); | ||
19 | console.log('ServiceWorker unregistered'); | ||
20 | }); | ||
21 | } catch (err) { | ||
22 | console.err(err); | ||
23 | } | ||
24 | }); | 12 | }); |
25 | 13 | ||
26 | module.exports = (Ferdi, settings) => { | 14 | module.exports = (Ferdi, settings) => { |