diff options
Diffstat (limited to 'recipes/snapchat')
-rw-r--r-- | recipes/snapchat/package.json | 2 | ||||
-rw-r--r-- | recipes/snapchat/webview.js | 14 |
2 files changed, 9 insertions, 7 deletions
diff --git a/recipes/snapchat/package.json b/recipes/snapchat/package.json index 50d7e01..e7c9408 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.0", | 4 | "version": "1.1.1", |
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 86bb422..78a2455 100644 --- a/recipes/snapchat/webview.js +++ b/recipes/snapchat/webview.js | |||
@@ -5,12 +5,14 @@ function _interopRequireDefault(obj) { | |||
5 | } | 5 | } |
6 | 6 | ||
7 | module.exports = Ferdium => { | 7 | module.exports = Ferdium => { |
8 | // TODO: If your SNAME service has unread messages, uncomment these lines to implement the logic for updating the badges | 8 | const getMessages = () => { |
9 | // const getMessages = () => { | 9 | const title = document.querySelector('title').textContent.match(/\d+/); |
10 | // // TODO: Insert your notification-finding code here | 10 | const count = title !== null ? title[0] : 0; |
11 | // Ferdium.setBadge(0, 0); | 11 | |
12 | // }; | 12 | Ferdium.setBadge(count); |
13 | // Ferdium.loop(getMessages); | 13 | }; |
14 | |||
15 | Ferdium.loop(getMessages); | ||
14 | 16 | ||
15 | Ferdium.injectCSS(_path.default.join(__dirname, 'service.css')); | 17 | Ferdium.injectCSS(_path.default.join(__dirname, 'service.css')); |
16 | }; | 18 | }; |