aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/whatsapp
diff options
context:
space:
mode:
Diffstat (limited to 'recipes/whatsapp')
-rw-r--r--recipes/whatsapp/package.json2
-rw-r--r--recipes/whatsapp/webview.js10
2 files changed, 6 insertions, 6 deletions
diff --git a/recipes/whatsapp/package.json b/recipes/whatsapp/package.json
index 4e59177..a364a1f 100644
--- a/recipes/whatsapp/package.json
+++ b/recipes/whatsapp/package.json
@@ -1,7 +1,7 @@
1{ 1{
2 "id": "whatsapp", 2 "id": "whatsapp",
3 "name": "WhatsApp", 3 "name": "WhatsApp",
4 "version": "3.3.2", 4 "version": "3.3.3",
5 "license": "MIT", 5 "license": "MIT",
6 "config": { 6 "config": {
7 "serviceURL": "https://web.whatsapp.com", 7 "serviceURL": "https://web.whatsapp.com",
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
3function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 3function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
4 4
5window.addEventListener('beforeunload', async () => {
6 Ferdi.clearStorageData(['appcache', 'serviceworkers', 'cachestorage', 'websql', 'indexdb']);
7 Ferdi.releaseServiceWorkers();
8});
9
10module.exports = Ferdi => { 5module.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'));