diff options
author | 2021-09-19 01:19:11 +0200 | |
---|---|---|
committer | 2021-09-19 01:19:11 +0200 | |
commit | 6ec6fef9017ee9d8fc436e48448d47b1fda8a820 (patch) | |
tree | 1839f85efb4e45b441e509d2fc12a28a05877e47 /recipes/android-messages/webview.js | |
parent | Fix images opening in browser instead of in Discord (#712) (diff) | |
parent | also fix privileged API access for googlemeet (diff) | |
download | ferdium-recipes-6ec6fef9017ee9d8fc436e48448d47b1fda8a820.tar.gz ferdium-recipes-6ec6fef9017ee9d8fc436e48448d47b1fda8a820.tar.zst ferdium-recipes-6ec6fef9017ee9d8fc436e48448d47b1fda8a820.zip |
Merge pull request #713 from kris7t/fix-api-access
fix: privileged API access
Diffstat (limited to 'recipes/android-messages/webview.js')
-rw-r--r-- | recipes/android-messages/webview.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/recipes/android-messages/webview.js b/recipes/android-messages/webview.js index 6a73441..db65de6 100644 --- a/recipes/android-messages/webview.js +++ b/recipes/android-messages/webview.js | |||
@@ -7,17 +7,17 @@ setTimeout(() => { | |||
7 | } | 7 | } |
8 | }, 1000); | 8 | }, 1000); |
9 | 9 | ||
10 | window.addEventListener('beforeunload', async () => { | ||
11 | Ferdi.clearStorageData(['appcache', 'serviceworkers', 'cachestorage', 'websql', 'indexdb']); | ||
12 | Ferdi.releaseServiceWorkers(); | ||
13 | }); | ||
14 | |||
15 | module.exports = (Ferdi, settings) => { | 10 | module.exports = (Ferdi, settings) => { |
16 | function getMessages() { | 11 | function getMessages() { |
17 | const messages = document.querySelectorAll('.text-content.unread').length; | 12 | const messages = document.querySelectorAll('.text-content.unread').length; |
18 | Ferdi.setBadge(messages); | 13 | Ferdi.setBadge(messages); |
19 | } | 14 | } |
20 | 15 | ||
16 | window.addEventListener('beforeunload', async () => { | ||
17 | Ferdi.clearStorageData(['appcache', 'serviceworkers', 'cachestorage', 'websql', 'indexdb']); | ||
18 | Ferdi.releaseServiceWorkers(); | ||
19 | }); | ||
20 | |||
21 | Ferdi.loop(getMessages); | 21 | Ferdi.loop(getMessages); |
22 | 22 | ||
23 | if (settings.isDarkModeEnabled) { | 23 | if (settings.isDarkModeEnabled) { |