aboutsummaryrefslogtreecommitdiffstats
path: root/recipes
diff options
context:
space:
mode:
authorLibravatar Brian Choromanski <BrianChoromanski@gmail.com>2022-11-23 17:20:12 -0500
committerLibravatar Vijay Aravamudhan <vraravam@users.noreply.github.com>2022-11-25 04:35:58 +0530
commit35e16bd72abb23a0b39512f503b2786bec6e11d3 (patch)
tree34df494e9e0317efe57193a35125bed31f5cd4cd /recipes
parentfix whatsapp initial loading issue (diff)
downloadferdium-recipes-35e16bd72abb23a0b39512f503b2786bec6e11d3.tar.gz
ferdium-recipes-35e16bd72abb23a0b39512f503b2786bec6e11d3.tar.zst
ferdium-recipes-35e16bd72abb23a0b39512f503b2786bec6e11d3.zip
Added getMessages function to Snapchat
Diffstat (limited to 'recipes')
-rw-r--r--recipes/snapchat/package.json2
-rw-r--r--recipes/snapchat/webview.js14
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
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};