diff options
Diffstat (limited to 'recipes/whatsapp/webview.js')
-rw-r--r-- | recipes/whatsapp/webview.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/recipes/whatsapp/webview.js b/recipes/whatsapp/webview.js index 3df34e3..fb1a20b 100644 --- a/recipes/whatsapp/webview.js +++ b/recipes/whatsapp/webview.js | |||
@@ -2,11 +2,6 @@ const _path = _interopRequireDefault(require('path')); | |||
2 | 2 | ||
3 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | 3 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } |
4 | 4 | ||
5 | window.addEventListener('beforeunload', async () => { | ||
6 | Ferdi.clearStorageData(['appcache', 'serviceworkers', 'cachestorage', 'websql', 'indexdb']); | ||
7 | Ferdi.releaseServiceWorkers(); | ||
8 | }); | ||
9 | |||
10 | module.exports = Ferdi => { | 5 | module.exports = Ferdi => { |
11 | const getMessages = function getMessages() { | 6 | const getMessages = function getMessages() { |
12 | let count = 0; | 7 | let count = 0; |
@@ -34,6 +29,11 @@ module.exports = Ferdi => { | |||
34 | Ferdi.setBadge(count, indirectCount); | 29 | Ferdi.setBadge(count, indirectCount); |
35 | }; | 30 | }; |
36 | 31 | ||
32 | window.addEventListener('beforeunload', async () => { | ||
33 | Ferdi.clearStorageData(['appcache', 'serviceworkers', 'cachestorage', 'websql', 'indexdb']); | ||
34 | Ferdi.releaseServiceWorkers(); | ||
35 | }); | ||
36 | |||
37 | Ferdi.loop(getMessages); | 37 | Ferdi.loop(getMessages); |
38 | 38 | ||
39 | Ferdi.injectCSS(_path.default.join(__dirname, 'service.css')); | 39 | Ferdi.injectCSS(_path.default.join(__dirname, 'service.css')); |