aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/gather
diff options
context:
space:
mode:
authorLibravatar Victor B <39555268+victorbnl@users.noreply.github.com>2023-04-27 23:13:04 +0200
committerLibravatar GitHub <noreply@github.com>2023-04-27 22:13:04 +0100
commit87c6770aba5aee88705c4cf3ea40d31d0d97300d (patch)
tree5cc7d0841b80d30c2d9ac5dbc3d98a771dedf00c /recipes/gather
parentadd kromonos as a contributor for code (#340) [skip ci] (diff)
downloadferdium-recipes-87c6770aba5aee88705c4cf3ea40d31d0d97300d.tar.gz
ferdium-recipes-87c6770aba5aee88705c4cf3ea40d31d0d97300d.tar.zst
ferdium-recipes-87c6770aba5aee88705c4cf3ea40d31d0d97300d.zip
Add Gather service (#343)
Diffstat (limited to 'recipes/gather')
-rw-r--r--recipes/gather/icon.svg1
-rw-r--r--recipes/gather/index.js1
-rw-r--r--recipes/gather/package.json9
-rw-r--r--recipes/gather/webview.js15
4 files changed, 26 insertions, 0 deletions
diff --git a/recipes/gather/icon.svg b/recipes/gather/icon.svg
new file mode 100644
index 0000000..d979ff7
--- /dev/null
+++ b/recipes/gather/icon.svg
@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48"><rect width="48" height="48" fill="#4358d8" ry="8"/><path fill="#fff" fill-rule="evenodd" d="M13.95 6.32a1.15 1.15 0 1 1 2-1.16l2.45 4.25.1.02 5.64 1.51a1.15 1.15 0 0 1-.6 2.23l-5.1-1.36-1.36 5.08a1.15 1.15 0 1 1-2.23-.6l1.52-5.63c0-.04.02-.07.03-.1zm11.96 18.42a4.65 4.65 0 1 0-4.66-8.06 4.65 4.65 0 0 0 4.66 8.06zm-1.2-2.04a2.3 2.3 0 1 0-2.3-3.99 2.3 2.3 0 0 0 2.3 3.99zm-6.77 1.28a4.65 4.65 0 1 1-8.05 4.66 4.65 4.65 0 0 1 8.05-4.66zm-2.08 1.14a2.3 2.3 0 1 1-3.98 2.3 2.3 2.3 0 0 1 3.98-2.3zm10.85 11.46a4.65 4.65 0 1 0-4.65-8.05 4.65 4.65 0 0 0 4.65 8.05zm-1.24-2.09a2.3 2.3 0 1 0-2.3-3.98 2.3 2.3 0 0 0 2.3 3.98zm12.64 1.95a4.65 4.65 0 1 1-8.06 4.65 4.65 4.65 0 0 1 8.06-4.65zm-2.06 1.15a2.3 2.3 0 1 1-3.99 2.3 2.3 2.3 0 0 1 3.99-2.3zm.36-6.6a4.65 4.65 0 1 0-4.65-8.06 4.65 4.65 0 0 0 4.65 8.05zm-1.16-2.06a2.3 2.3 0 1 0-2.3-3.98 2.3 2.3 0 0 0 2.3 3.98zm2.06-16.15a4.65 4.65 0 1 1-8.05 4.65 4.65 4.65 0 0 1 8.05-4.65zm-2.08 1.12a2.3 2.3 0 1 1-3.98 2.3 2.3 2.3 0 0 1 3.98-2.3z" clip-rule="evenodd"/></svg>
diff --git a/recipes/gather/index.js b/recipes/gather/index.js
new file mode 100644
index 0000000..dd41f72
--- /dev/null
+++ b/recipes/gather/index.js
@@ -0,0 +1 @@
module.exports = Ferdium => Ferdium;
diff --git a/recipes/gather/package.json b/recipes/gather/package.json
new file mode 100644
index 0000000..ab59e6b
--- /dev/null
+++ b/recipes/gather/package.json
@@ -0,0 +1,9 @@
1{
2 "id": "gather",
3 "name": "Gather",
4 "version": "1.0.0",
5 "license": "MIT",
6 "config": {
7 "serviceURL": "https://app.gather.town/app"
8 }
9}
diff --git a/recipes/gather/webview.js b/recipes/gather/webview.js
new file mode 100644
index 0000000..d7d506a
--- /dev/null
+++ b/recipes/gather/webview.js
@@ -0,0 +1,15 @@
1const _path = _interopRequireDefault(require('path'));
2
3function _interopRequireDefault(obj) {
4 return obj && obj.__esModule ? obj : { default: obj };
5}
6
7module.exports = Ferdium => {
8 const getMessages = () => {
9 const element = document.querySelector("[aria-label='Chat'] > div > div > p");
10 Ferdium.setBadge(element ? Ferdium.safeParseInt(element.textContent) : 0);
11 }
12
13 Ferdium.loop(getMessages);
14 Ferdium.injectCSS(_path.default.join(__dirname, 'service.css'));
15};