aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Vijay Aravamudhan <vraravam@users.noreply.github.com>2021-09-12 17:06:26 +0530
committerLibravatar GitHub <noreply@github.com>2021-09-12 11:36:26 +0000
commit0e982b000f02f78676a8d9e3d021a84bf263a9ed (patch)
tree9577fe59c4fce7ebfa169965b6f1c51e3f333555
parentNew recipe: 'drive' (#698) (diff)
downloadferdium-recipes-0e982b000f02f78676a8d9e3d021a84bf263a9ed.tar.gz
ferdium-recipes-0e982b000f02f78676a8d9e3d021a84bf263a9ed.tar.zst
ferdium-recipes-0e982b000f02f78676a8d9e3d021a84bf263a9ed.zip
New recipe: 'plek' (#699)
-rw-r--r--all.json9
-rw-r--r--recipes/plek/icon.svg35
-rw-r--r--recipes/plek/index.js1
-rw-r--r--recipes/plek/package.json14
-rw-r--r--recipes/plek/service.css0
-rw-r--r--recipes/plek/webview.js25
6 files changed, 84 insertions, 0 deletions
diff --git a/all.json b/all.json
index cbb5b7b..d2ebdb2 100644
--- a/all.json
+++ b/all.json
@@ -1159,6 +1159,15 @@
1159 }, 1159 },
1160 { 1160 {
1161 "featured": false, 1161 "featured": false,
1162 "id": "plek",
1163 "name": "Plek",
1164 "version": "1.0.0",
1165 "icons": {
1166 "svg": "https://cdn.jsdelivr.net/gh/getferdi/recipes/recipes/plek/icon.svg"
1167 }
1168 },
1169 {
1170 "featured": false,
1162 "id": "pleroma", 1171 "id": "pleroma",
1163 "name": "Pleroma", 1172 "name": "Pleroma",
1164 "version": "1.2.0", 1173 "version": "1.2.0",
diff --git a/recipes/plek/icon.svg b/recipes/plek/icon.svg
new file mode 100644
index 0000000..3117f5c
--- /dev/null
+++ b/recipes/plek/icon.svg
@@ -0,0 +1,35 @@
1<?xml version='1.0' encoding='UTF-8'?>
2<!-- Made by gio1135 using Gravit.io -->
3<svg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' style='isolation:isolate' viewBox='0 0 800 800' width='800' height='800'>
4 <defs>
5 <clipPath id='_clipPath_WSMg3MB2SE1NraJ1nyjih3IvGqHIGkkg'>
6 <rect width='800' height='800' />
7 </clipPath>
8 </defs>
9 <g clip-path='url(#_clipPath_WSMg3MB2SE1NraJ1nyjih3IvGqHIGkkg)'>
10 <mask id='_mask_2BvtN9yaMg7qtna9I8S2XY65cqmsSlGm'>
11 <path d=' M 800 400 C 800 179.234 620.766 0 400 0 C 179.234 0 0 179.234 0 400 C 0 620.766 179.234 800 400 800 Q 402.471 800 724.438 800 C 766.142 800 800 766.142 800 724.438 Q 800 402.471 800 400 Z ' fill='white' stroke='none' />
12 </mask>
13 <linearGradient id='_lgradient_6' x1='0%' y1='50%' x2='6.123233995736766e-15%' y2='150%'>
14 <stop offset='0%' stop-opacity='1' style='stop-color:rgb(246,200,68)' />
15 <stop offset='22.17391304347826%' stop-opacity='1' style='stop-color:rgb(244,186,21)' />
16 <stop offset='100%' stop-opacity='1' style='stop-color:rgb(195,149,17)' />
17 </linearGradient>
18 <path d=' M 800 400 C 800 179.234 620.766 0 400 0 C 179.234 0 0 179.234 0 400 C 0 620.766 179.234 800 400 800 Q 402.471 800 724.438 800 C 766.142 800 800 766.142 800 724.438 Q 800 402.471 800 400 Z ' fill='rgb(244,186,21)' mask='url(#_mask_2BvtN9yaMg7qtna9I8S2XY65cqmsSlGm)' vector-effect='non-scaling-stroke' stroke-width='8' stroke='url(#_lgradient_6)' stroke-linejoin='round' stroke-linecap='round' stroke-miterlimit='3' />
19 <path d=' M 526 800 Q 527.511 800 724.438 800 C 766.142 800 800 766.142 800 724.438 Q 800 525.526 800 524 L 549.421 273.421 L 274.421 548.421 L 526 800 L 526 800 Z ' fill='rgb(0,0,0)' fill-opacity='0.1' />
20 <defs>
21 <filter id='AGwOQbVrNSbfUAymiSmBjNxoViV51mlH' x='-200%' y='-200%' width='400%' height='400%'>
22 <feGaussianBlur stdDeviation='8.587218125678056' />
23 </filter>
24 </defs>
25 <g filter='url(#AGwOQbVrNSbfUAymiSmBjNxoViV51mlH)'>
26 <path d=' M 600 409 C 600 298.617 510.383 209 400 209 C 289.617 209 200 298.617 200 409 C 200 519.383 289.617 609 400 609 C 452.899 609 501.029 588.418 536.812 554.833 L 582 603 Q 587.144 606.248 590 605 Q 592.782 603.785 594 598 Q 600 413.326 600 409 Z ' fill='rgb(0,0,0)' fill-opacity='0.2' />
27 </g>
28 <linearGradient id='_lgradient_7' x1='49.0990990990991%' y1='50%' x2='50.00000000000002%' y2='100%'>
29 <stop offset='0%' stop-opacity='1' style='stop-color:rgb(255,255,255)' />
30 <stop offset='100%' stop-opacity='1' style='stop-color:rgb(221,221,221)' />
31 </linearGradient>
32 <path d=' M 600 400 C 600 289.617 510.383 200 400 200 C 289.617 200 200 289.617 200 400 C 200 510.383 289.617 600 400 600 C 452.899 600 501.029 579.418 536.812 545.833 L 582 594 Q 587.144 597.248 590 596 Q 592.782 594.785 594 589 Q 600 404.326 600 400 Z ' fill='rgb(255,255,255)' vector-effect='non-scaling-stroke' stroke-width='2' stroke='url(#_lgradient_7)' stroke-linejoin='miter' stroke-linecap='square' stroke-miterlimit='3' />
33 <path d=' M 599.995 398.637 C 599.254 289.984 509.923 202 400 202 C 289.617 202 200 290.721 200 400 L 400 400 L 599.995 398.637 Z ' fill='rgb(0,0,0)' fill-opacity='0.1' />
34 </g>
35</svg> \ No newline at end of file
diff --git a/recipes/plek/index.js b/recipes/plek/index.js
new file mode 100644
index 0000000..23607bd
--- /dev/null
+++ b/recipes/plek/index.js
@@ -0,0 +1 @@
module.exports = Ferdi => Ferdi;
diff --git a/recipes/plek/package.json b/recipes/plek/package.json
new file mode 100644
index 0000000..de37a6e
--- /dev/null
+++ b/recipes/plek/package.json
@@ -0,0 +1,14 @@
1{
2 "id": "plek",
3 "name": "Plek",
4 "version": "1.0.0",
5 "repository": "https://github.com/jsimonetti/franz-recipe-plek",
6 "license": "MIT",
7 "config": {
8 "serviceURL": "https://{teamId}.plek.co",
9 "hasNotificationSound": true,
10 "hasIndirectMessages": true,
11 "hasTeamId": true,
12 "disablewebsecurity": true
13 }
14}
diff --git a/recipes/plek/service.css b/recipes/plek/service.css
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/recipes/plek/service.css
diff --git a/recipes/plek/webview.js b/recipes/plek/webview.js
new file mode 100644
index 0000000..bc6d5aa
--- /dev/null
+++ b/recipes/plek/webview.js
@@ -0,0 +1,25 @@
1const _path = _interopRequireDefault(require('path'));
2
3function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
4
5module.exports = (Ferdi) => {
6 const getMessages = () => {
7 let directMessages = 0;
8 let indirectMessages = 0;
9
10 const elements = document.querySelectorAll('.counter');
11 for (let i = 0; i < elements.length; i += 1) {
12 directMessages += Ferdi.safeParseInt(elements[i].innerText);
13 }
14
15 const elements2 = document.querySelectorAll('.badge');
16 for (let i = 0; i < elements2.length; i += 1) {
17 indirectMessages += Ferdi.safeParseInt(elements2[i].innerText);
18 }
19
20 Ferdi.setBadge(directMessages, indirectMessages);
21 };
22
23 Ferdi.loop(getMessages);
24 Ferdi.injectCSS(_path.default.join(__dirname, 'service.css'));
25};