diff options
author | 2021-09-19 01:19:11 +0200 | |
---|---|---|
committer | 2021-09-19 01:19:11 +0200 | |
commit | 6ec6fef9017ee9d8fc436e48448d47b1fda8a820 (patch) | |
tree | 1839f85efb4e45b441e509d2fc12a28a05877e47 /recipes/devRant/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/devRant/webview.js')
-rw-r--r-- | recipes/devRant/webview.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/recipes/devRant/webview.js b/recipes/devRant/webview.js index e7e41a5..62a47e6 100644 --- a/recipes/devRant/webview.js +++ b/recipes/devRant/webview.js | |||
@@ -9,11 +9,6 @@ setTimeout(() => { | |||
9 | } | 9 | } |
10 | }, 1000); | 10 | }, 1000); |
11 | 11 | ||
12 | window.addEventListener('beforeunload', async () => { | ||
13 | Ferdi.clearStorageData(['appcache', 'serviceworkers', 'cachestorage', 'websql', 'indexdb']); | ||
14 | Ferdi.releaseServiceWorkers(); | ||
15 | }); | ||
16 | |||
17 | module.exports = (Ferdi) => { | 12 | module.exports = (Ferdi) => { |
18 | const getMessages = function getMessages() { | 13 | const getMessages = function getMessages() { |
19 | const elements = document.querySelectorAll('.CxUIE, .unread, ._0LqQ'); | 14 | const elements = document.querySelectorAll('.CxUIE, .unread, ._0LqQ'); |
@@ -27,6 +22,11 @@ module.exports = (Ferdi) => { | |||
27 | Ferdi.setBadge(count); | 22 | Ferdi.setBadge(count); |
28 | }; | 23 | }; |
29 | 24 | ||
25 | window.addEventListener('beforeunload', async () => { | ||
26 | Ferdi.clearStorageData(['appcache', 'serviceworkers', 'cachestorage', 'websql', 'indexdb']); | ||
27 | Ferdi.releaseServiceWorkers(); | ||
28 | }); | ||
29 | |||
30 | Ferdi.loop(getMessages); | 30 | Ferdi.loop(getMessages); |
31 | Ferdi.injectCSS(_path.default.join(__dirname, 'service.css')); | 31 | Ferdi.injectCSS(_path.default.join(__dirname, 'service.css')); |
32 | }; | 32 | }; |