aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/snapchat/webview.js
diff options
context:
space:
mode:
Diffstat (limited to 'recipes/snapchat/webview.js')
-rw-r--r--recipes/snapchat/webview.js14
1 files changed, 8 insertions, 6 deletions
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
7module.exports = Ferdium => { 7module.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};