diff options
Diffstat (limited to 'recipes/snapchat')
-rw-r--r-- | recipes/snapchat/package.json | 2 | ||||
-rw-r--r-- | recipes/snapchat/webview.js | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/recipes/snapchat/package.json b/recipes/snapchat/package.json index e7c9408..0c96faa 100644 --- a/recipes/snapchat/package.json +++ b/recipes/snapchat/package.json | |||
@@ -1,7 +1,7 @@ | |||
1 | { | 1 | { |
2 | "id": "snapchat", | 2 | "id": "snapchat", |
3 | "name": "Snapchat", | 3 | "name": "Snapchat", |
4 | "version": "1.1.1", | 4 | "version": "1.2.0", |
5 | "license": "MIT", | 5 | "license": "MIT", |
6 | "config": { | 6 | "config": { |
7 | "serviceURL": "https://web.snapchat.com/" | 7 | "serviceURL": "https://web.snapchat.com/" |
diff --git a/recipes/snapchat/webview.js b/recipes/snapchat/webview.js index 78a2455..352b012 100644 --- a/recipes/snapchat/webview.js +++ b/recipes/snapchat/webview.js | |||
@@ -1,13 +1,13 @@ | |||
1 | const _path = _interopRequireDefault(require('path')); | ||
2 | |||
3 | function _interopRequireDefault(obj) { | 1 | function _interopRequireDefault(obj) { |
4 | return obj && obj.__esModule ? obj : { default: obj }; | 2 | return obj && obj.__esModule ? obj : { default: obj }; |
5 | } | 3 | } |
6 | 4 | ||
5 | const _path = _interopRequireDefault(require('path')); | ||
6 | |||
7 | module.exports = Ferdium => { | 7 | module.exports = Ferdium => { |
8 | const getMessages = () => { | 8 | const getMessages = () => { |
9 | const title = document.querySelector('title').textContent.match(/\d+/); | 9 | const title = document.querySelector('title').textContent.match(/\d+/); |
10 | const count = title !== null ? title[0] : 0; | 10 | const count = title === null ? 0 : title[0]; |
11 | 11 | ||
12 | Ferdium.setBadge(count); | 12 | Ferdium.setBadge(count); |
13 | }; | 13 | }; |