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.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/recipes/lastpass/webview.js b/recipes/lastpass/webview.js
index 4a92e0c..96e92ff 100644
--- a/recipes/lastpass/webview.js
+++ b/recipes/lastpass/webview.js
@@ -8,11 +8,6 @@ setTimeout(() => {
8 } 8 }
9}, 1000); 9}, 1000);
10 10
11window.addEventListener('beforeunload', async () => {
12 Ferdi.clearStorageData(['appcache', 'serviceworkers', 'cachestorage', 'websql', 'indexdb']);
13 Ferdi.releaseServiceWorkers();
14});
15
16module.exports = Ferdi => { 11module.exports = Ferdi => {
17 const getMessages = function getMessages() { 12 const getMessages = function getMessages() {
18 const elements = document.querySelectorAll('.CxUIE, .unread'); 13 const elements = document.querySelectorAll('.CxUIE, .unread');
@@ -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 31
32 Ferdi.injectCSS(_path.default.join(__dirname, 'service.css')); 32 Ferdi.injectCSS(_path.default.join(__dirname, 'service.css'));