aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Vijay Aravamudhan <vraravam@users.noreply.github.com>2021-09-12 07:07:08 +0530
committerLibravatar Vijay A <avijayr@protonmail.com>2021-09-12 07:32:30 +0530
commit57ba0c384871f14c27428f4b07b233e0fd2f4733 (patch)
treeceabacffb8c872472026dd05e8650568110982fc
parentdocs: added TODO [skip ci] (diff)
downloadferdium-recipes-57ba0c384871f14c27428f4b07b233e0fd2f4733.tar.gz
ferdium-recipes-57ba0c384871f14c27428f4b07b233e0fd2f4733.tar.zst
ferdium-recipes-57ba0c384871f14c27428f4b07b233e0fd2f4733.zip
New service: 'whereby' (#683)
-rw-r--r--all.json9
-rw-r--r--recipes/whereby/icon.svg18
-rw-r--r--recipes/whereby/index.js1
-rw-r--r--recipes/whereby/package.json12
-rw-r--r--recipes/whereby/service.css5
-rw-r--r--recipes/whereby/webview.js25
6 files changed, 70 insertions, 0 deletions
diff --git a/all.json b/all.json
index e16daa5..bdf4982 100644
--- a/all.json
+++ b/all.json
@@ -1582,6 +1582,15 @@
1582 }, 1582 },
1583 { 1583 {
1584 "featured": false, 1584 "featured": false,
1585 "id": "whereby",
1586 "name": "whereby.com",
1587 "version": "1.0.0",
1588 "icons": {
1589 "svg": "https://cdn.jsdelivr.net/gh/getferdi/recipes/recipes/whereby/icon.svg"
1590 }
1591 },
1592 {
1593 "featured": false,
1585 "id": "wire", 1594 "id": "wire",
1586 "name": "Wire", 1595 "name": "Wire",
1587 "version": "1.0.3", 1596 "version": "1.0.3",
diff --git a/recipes/whereby/icon.svg b/recipes/whereby/icon.svg
new file mode 100644
index 0000000..02c850b
--- /dev/null
+++ b/recipes/whereby/icon.svg
@@ -0,0 +1,18 @@
1<?xml version="1.0" standalone="no"?>
2<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
3 "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
4<svg version="1.0" xmlns="http://www.w3.org/2000/svg"
5 width="64.000000pt" height="64.000000pt" viewBox="0 0 64.000000 64.000000"
6 preserveAspectRatio="xMidYMid meet">
7
8<g transform="translate(0.000000,64.000000) scale(0.100000,-0.100000)"
9fill="#000000" stroke="none">
10<path d="M434 480 c-12 -4 -33 -23 -46 -40 l-26 -33 -12 37 c-8 26 -16 36 -27
1132 -8 -3 -59 -6 -113 -6 l-99 0 19 -32 c10 -18 42 -89 70 -158 28 -69 55 -129
1259 -133 4 -4 23 31 41 78 22 56 36 81 41 73 5 -7 21 -46 36 -85 15 -40 30 -73
1333 -73 3 0 27 55 53 123 54 137 59 187 25 211 -25 18 -25 18 -54 6z m-172 -31
14c11 -6 31 -35 44 -65 l24 -53 -21 -48 -21 -48 -39 99 c-31 76 -37 101 -28 112
1514 17 15 17 41 3z m199 -40 c24 -24 22 -66 -7 -135 l-16 -39 -33 80 c-18 44
16-31 83 -28 88 5 8 41 25 56 26 4 1 16 -8 28 -20z"/>
17</g>
18</svg>
diff --git a/recipes/whereby/index.js b/recipes/whereby/index.js
new file mode 100644
index 0000000..23607bd
--- /dev/null
+++ b/recipes/whereby/index.js
@@ -0,0 +1 @@
module.exports = Ferdi => Ferdi;
diff --git a/recipes/whereby/package.json b/recipes/whereby/package.json
new file mode 100644
index 0000000..5ca5c17
--- /dev/null
+++ b/recipes/whereby/package.json
@@ -0,0 +1,12 @@
1{
2 "id": "whereby",
3 "name": "whereby.com",
4 "version": "1.0.0",
5 "license": "MIT",
6 "config": {
7 "serviceURL": "https://whereby.com/{teamId}",
8 "hasNotificationSound": true,
9 "hasTeamId": true,
10 "urlInputPrefix": "https://whereby.com/"
11 }
12}
diff --git a/recipes/whereby/service.css b/recipes/whereby/service.css
new file mode 100644
index 0000000..b453fd4
--- /dev/null
+++ b/recipes/whereby/service.css
@@ -0,0 +1,5 @@
1.app-wrapper-web .app {
2 width: 100% !important;
3 height: 100% !important;
4 top: 0 !important;
5}
diff --git a/recipes/whereby/webview.js b/recipes/whereby/webview.js
new file mode 100644
index 0000000..0e5529e
--- /dev/null
+++ b/recipes/whereby/webview.js
@@ -0,0 +1,25 @@
1var _path = _interopRequireDefault(require('path'));
2
3function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
4
5module.exports = Ferdi => {
6 const getMessages = function getMessages() {
7 const elements = document.querySelectorAll('.CxUIE, .unread');
8 let count = 0;
9
10 for (let i = 0; i < elements.length; i += 1) {
11 if (elements[i].querySelectorAll('*[data-icon="muted"]').length === 0) {
12 count += 1;
13 }
14 }
15
16 // set Ferdi badge
17 Ferdi.setBadge(count);
18 };
19
20 // check for new messages every second and update Ferdi badge
21 Ferdi.loop(getMessages);
22
23 // inject Ferdi.css stylesheet
24 Ferdi.injectCSS(_path.default.join(__dirname, 'service.css'));
25};