aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/kiwiirc
diff options
context:
space:
mode:
authorLibravatar Vijay A <vraravam@users.noreply.github.com>2022-07-08 21:49:19 +0530
committerLibravatar Vijay Aravamudhan <vraravam@users.noreply.github.com>2022-07-08 22:40:13 +0530
commit2fff7fe2bbc1697b38cd253223722c2701eab70d (patch)
tree93f55712b4c6c48c907df1a25949743894f0a1d3 /recipes/kiwiirc
parentFix indirect notification count in github recipe (fixes #108) (diff)
downloadferdium-recipes-2fff7fe2bbc1697b38cd253223722c2701eab70d.tar.gz
ferdium-recipes-2fff7fe2bbc1697b38cd253223722c2701eab70d.tar.zst
ferdium-recipes-2fff7fe2bbc1697b38cd253223722c2701eab70d.zip
New recipe: kiwi IRC
Diffstat (limited to 'recipes/kiwiirc')
-rw-r--r--recipes/kiwiirc/icon.svg168
-rw-r--r--recipes/kiwiirc/index.js1
-rw-r--r--recipes/kiwiirc/package.json10
-rw-r--r--recipes/kiwiirc/service.css5
-rw-r--r--recipes/kiwiirc/webview.js34
5 files changed, 218 insertions, 0 deletions
diff --git a/recipes/kiwiirc/icon.svg b/recipes/kiwiirc/icon.svg
new file mode 100644
index 0000000..da150b5
--- /dev/null
+++ b/recipes/kiwiirc/icon.svg
@@ -0,0 +1,168 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="50" height="50" viewBox="0 0 50 50" version="1.1">
3<defs>
4<linearGradient id="linear0" gradientUnits="userSpaceOnUse" x1="-122.83" y1="616.47" x2="470.07" y2="340" gradientTransform="matrix(0.0809776,0.014252,-0.0122693,0.0940634,17.864154,-19.138518)">
5<stop offset="0" style="stop-color:rgb(63.921569%,77.647059%,24.705882%);stop-opacity:1;"/>
6<stop offset="0.42" style="stop-color:rgb(63.921569%,77.647059%,31.764706%);stop-opacity:1;"/>
7<stop offset="1" style="stop-color:rgb(63.921569%,77.647059%,43.921569%);stop-opacity:1;"/>
8</linearGradient>
9<filter id="alpha" filterUnits="objectBoundingBox" x="0%" y="0%" width="100%" height="100%">
10 <feColorMatrix type="matrix" in="SourceGraphic" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0"/>
11</filter>
12<mask id="mask0">
13 <g filter="url(#alpha)">
14<rect x="0" y="0" width="50" height="50" style="fill:rgb(0%,0%,0%);fill-opacity:0.34902;stroke:none;"/>
15 </g>
16</mask>
17<clipPath id="clip1">
18 <rect x="0" y="0" width="51" height="50"/>
19</clipPath>
20<g id="surface5" clip-path="url(#clip1)">
21<path style=" stroke:none;fill-rule:nonzero;fill:rgb(100%,100%,100%);fill-opacity:1;" d="M 30.054688 15.09375 C 32.308594 18.589844 31.171875 24.003906 27.511719 27.1875 C 23.855469 30.371094 19.0625 30.113281 16.808594 26.617188 "/>
22</g>
23<mask id="mask1">
24 <g filter="url(#alpha)">
25<rect x="0" y="0" width="50" height="50" style="fill:rgb(0%,0%,0%);fill-opacity:0.25098;stroke:none;"/>
26 </g>
27</mask>
28<clipPath id="clip2">
29 <rect x="0" y="0" width="51" height="50"/>
30</clipPath>
31<g id="surface8" clip-path="url(#clip2)">
32<path style=" stroke:none;fill-rule:nonzero;fill:rgb(100%,100%,100%);fill-opacity:1;" d="M 19.367188 29.308594 C 18.058594 32.300781 16.394531 38.328125 15.003906 37.503906 C 13.605469 36.675781 16.886719 31.613281 18.203125 28.621094 "/>
33</g>
34<mask id="mask2">
35 <g filter="url(#alpha)">
36<rect x="0" y="0" width="50" height="50" style="fill:rgb(0%,0%,0%);fill-opacity:0.25098;stroke:none;"/>
37 </g>
38</mask>
39<clipPath id="clip3">
40 <rect x="0" y="0" width="51" height="50"/>
41</clipPath>
42<g id="surface11" clip-path="url(#clip3)">
43<path style=" stroke:none;fill-rule:nonzero;fill:rgb(100%,100%,100%);fill-opacity:1;" d="M 23.40625 29.523438 C 23.40625 31.671875 24.078125 35.664062 22.878906 35.664062 C 21.683594 35.660156 22.398438 31.671875 22.398438 29.523438 "/>
44</g>
45<mask id="mask3">
46 <g filter="url(#alpha)">
47<rect x="0" y="0" width="50" height="50" style="fill:rgb(0%,0%,0%);fill-opacity:0.25098;stroke:none;"/>
48 </g>
49</mask>
50<clipPath id="clip4">
51 <rect x="0" y="0" width="51" height="50"/>
52</clipPath>
53<g id="surface14" clip-path="url(#clip4)">
54<path style=" stroke:none;fill-rule:nonzero;fill:rgb(100%,100%,100%);fill-opacity:1;" d="M 26.121094 28.765625 C 26.5 31.132812 27.953125 35.375 26.632812 35.660156 C 25.296875 35.953125 25.390625 31.371094 25.011719 29.003906 "/>
55</g>
56<mask id="mask4">
57 <g filter="url(#alpha)">
58<rect x="0" y="0" width="50" height="50" style="fill:rgb(0%,0%,0%);fill-opacity:0.231373;stroke:none;"/>
59 </g>
60</mask>
61<clipPath id="clip5">
62 <rect x="0" y="0" width="51" height="50"/>
63</clipPath>
64<g id="surface17" clip-path="url(#clip5)">
65<path style=" stroke:none;fill-rule:nonzero;fill:rgb(20%,20%,20%);fill-opacity:1;" d="M 47.679688 0.0703125 L 0.132812 41.121094 C -0.808594 37.246094 3.113281 27.359375 16.261719 16.109375 C 29.410156 4.859375 44.128906 -0.484375 47.679688 0.0703125 Z M 47.679688 0.0703125 "/>
66</g>
67<linearGradient id="linear1" gradientUnits="userSpaceOnUse" x1="421.38" y1="652.87" x2="1015.71" y2="375.73" gradientTransform="matrix(-0.0809776,-0.0123518,0.0106334,-0.0940634,76.878026,77.228917)">
68<stop offset="0" style="stop-color:rgb(63.921569%,77.647059%,24.705882%);stop-opacity:1;"/>
69<stop offset="0.42" style="stop-color:rgb(63.921569%,77.647059%,31.764706%);stop-opacity:1;"/>
70<stop offset="1" style="stop-color:rgb(63.921569%,77.647059%,43.921569%);stop-opacity:1;"/>
71</linearGradient>
72<mask id="mask5">
73 <g filter="url(#alpha)">
74<rect x="0" y="0" width="50" height="50" style="fill:rgb(0%,0%,0%);fill-opacity:0.341176;stroke:none;"/>
75 </g>
76</mask>
77<clipPath id="clip6">
78 <rect x="0" y="0" width="51" height="50"/>
79</clipPath>
80<g id="surface20" clip-path="url(#clip6)">
81<path style=" stroke:none;fill-rule:nonzero;fill:rgb(10.196078%,10.196078%,10.196078%);fill-opacity:1;" d="M 46.984375 0.667969 L 1.4375 39.996094 C 0.484375 36.316406 3.703125 27.359375 16.324219 16.5625 C 28.945312 5.761719 43.53125 0.175781 46.984375 0.667969 Z M 46.984375 0.667969 "/>
82</g>
83<mask id="mask6">
84 <g filter="url(#alpha)">
85<rect x="0" y="0" width="50" height="50" style="fill:rgb(0%,0%,0%);fill-opacity:0.34902;stroke:none;"/>
86 </g>
87</mask>
88<clipPath id="clip7">
89 <rect x="0" y="0" width="51" height="50"/>
90</clipPath>
91<g id="surface23" clip-path="url(#clip7)">
92<path style=" stroke:none;fill-rule:nonzero;fill:rgb(100%,100%,100%);fill-opacity:1;" d="M 16.90625 26.761719 C 17.015625 24.292969 17.863281 23.0625 21.53125 19.914062 C 25.203125 16.765625 29.011719 14.730469 30.222656 15.363281 "/>
93</g>
94<mask id="mask7">
95 <g filter="url(#alpha)">
96<rect x="0" y="0" width="50" height="50" style="fill:rgb(0%,0%,0%);fill-opacity:0.25098;stroke:none;"/>
97 </g>
98</mask>
99<clipPath id="clip8">
100 <rect x="0" y="0" width="51" height="50"/>
101</clipPath>
102<g id="surface26" clip-path="url(#clip8)">
103<path style=" stroke:none;fill-rule:nonzero;fill:rgb(100%,100%,100%);fill-opacity:1;" d="M 29.515625 14.4375 C 31.1875 12.4375 33.738281 8.847656 34.738281 8.613281 C 35.738281 8.375 32.027344 12.238281 30.355469 14.238281 "/>
104</g>
105<mask id="mask8">
106 <g filter="url(#alpha)">
107<rect x="0" y="0" width="50" height="50" style="fill:rgb(0%,0%,0%);fill-opacity:0.25098;stroke:none;"/>
108 </g>
109</mask>
110<clipPath id="clip9">
111 <rect x="0" y="0" width="51" height="50"/>
112</clipPath>
113<g id="surface29" clip-path="url(#clip9)">
114<path style=" stroke:none;fill-rule:nonzero;fill:rgb(100%,100%,100%);fill-opacity:1;" d="M 26.183594 16.15625 C 26.597656 15.144531 26.804688 13.5625 27.804688 13.019531 C 28.808594 12.476562 27.4375 14.6875 27.023438 15.695312 "/>
115</g>
116<mask id="mask9">
117 <g filter="url(#alpha)">
118<rect x="0" y="0" width="50" height="50" style="fill:rgb(0%,0%,0%);fill-opacity:0.25098;stroke:none;"/>
119 </g>
120</mask>
121<clipPath id="clip10">
122 <rect x="0" y="0" width="51" height="50"/>
123</clipPath>
124<g id="surface32" clip-path="url(#clip10)">
125<path style=" stroke:none;fill-rule:nonzero;fill:rgb(100%,100%,100%);fill-opacity:1;" d="M 23.769531 17.734375 C 23.90625 16.789062 23.515625 15.441406 24.671875 14.710938 C 25.828125 13.980469 24.882812 16.175781 24.742188 17.117188 "/>
126</g>
127<mask id="mask10">
128 <g filter="url(#alpha)">
129<rect x="0" y="0" width="50" height="50" style="fill:rgb(0%,0%,0%);fill-opacity:0.188235;stroke:none;"/>
130 </g>
131</mask>
132<clipPath id="clip11">
133 <rect x="0" y="0" width="51" height="50"/>
134</clipPath>
135<g id="surface35" clip-path="url(#clip11)">
136<path style=" stroke:none;fill-rule:nonzero;fill:rgb(100%,100%,100%);fill-opacity:1;" d="M 3.058594 39.664062 C 13.015625 47.800781 49.3125 54.738281 46.019531 2.570312 C 49.527344 13.34375 49.746094 32.191406 37.882812 42.4375 C 26.015625 52.679688 8.296875 45.722656 3.058594 39.664062 Z M 3.058594 39.664062 "/>
137</g>
138</defs>
139<g id="surface1">
140<path style=" stroke:none;fill-rule:nonzero;fill:rgb(65.098039%,48.627451%,32.156863%);fill-opacity:1;" d="M 0.132812 41.121094 L 47.679688 0.0703125 C 51.558594 11.996094 51.796875 32.851562 38.667969 44.1875 C 25.539062 55.527344 5.929688 47.828125 0.132812 41.121094 Z M 0.132812 41.121094 "/>
141<path style=" stroke:none;fill-rule:nonzero;fill:url(#linear0);" d="M 1.300781 39.921875 L 46.9375 0.515625 C 50.660156 11.960938 50.890625 31.984375 38.289062 42.863281 C 25.6875 53.746094 6.863281 46.355469 1.300781 39.921875 Z M 1.300781 39.921875 "/>
142<use xlink:href="#surface5" mask="url(#mask0)"/>
143<use xlink:href="#surface8" mask="url(#mask1)"/>
144<use xlink:href="#surface11" mask="url(#mask2)"/>
145<use xlink:href="#surface14" mask="url(#mask3)"/>
146<path style=" stroke:none;fill-rule:nonzero;fill:rgb(0%,0%,0%);fill-opacity:1;" d="M 33.148438 14.835938 C 32.507812 15.167969 31.929688 15.277344 31.851562 15.078125 C 31.777344 14.878906 32.230469 14.449219 32.871094 14.117188 C 33.511719 13.78125 34.089844 13.671875 34.167969 13.871094 C 34.246094 14.070312 33.789062 14.5 33.148438 14.835938 Z M 33.148438 14.835938 "/>
147<path style=" stroke:none;fill-rule:nonzero;fill:rgb(0%,0%,0%);fill-opacity:1;" d="M 35.503906 17.636719 C 34.8125 17.769531 34.226562 17.703125 34.195312 17.488281 C 34.164062 17.277344 34.699219 16.992188 35.390625 16.859375 C 36.085938 16.726562 36.667969 16.792969 36.699219 17.007812 C 36.730469 17.222656 36.195312 17.503906 35.503906 17.636719 Z M 35.503906 17.636719 "/>
148<path style=" stroke:none;fill-rule:nonzero;fill:rgb(0%,0%,0%);fill-opacity:1;" d="M 22.542969 32.34375 C 22.535156 31.527344 22.679688 30.867188 22.871094 30.863281 C 23.0625 30.859375 23.21875 31.519531 23.226562 32.332031 C 23.234375 33.144531 23.089844 33.808594 22.898438 33.8125 C 22.707031 33.8125 22.550781 33.15625 22.542969 32.34375 Z M 22.542969 32.34375 "/>
149<path style=" stroke:none;fill-rule:nonzero;fill:rgb(0%,0%,0%);fill-opacity:1;" d="M 25.777344 32.957031 C 25.652344 32.15625 25.703125 31.476562 25.886719 31.4375 C 26.070312 31.402344 26.320312 32.019531 26.445312 32.820312 C 26.566406 33.621094 26.519531 34.300781 26.332031 34.339844 C 26.148438 34.378906 25.898438 33.761719 25.777344 32.957031 Z M 25.777344 32.957031 "/>
150<path style=" stroke:none;fill-rule:nonzero;fill:rgb(0%,0%,0%);fill-opacity:1;" d="M 16.042969 34.140625 C 16.3125 33.390625 16.675781 32.851562 16.847656 32.933594 C 17.023438 33.019531 16.941406 33.695312 16.667969 34.445312 C 16.394531 35.199219 16.035156 35.738281 15.863281 35.652344 C 15.691406 35.570312 15.769531 34.894531 16.042969 34.140625 Z M 16.042969 34.140625 "/>
151<path style=" stroke:none;fill-rule:nonzero;fill:rgb(0%,0%,0%);fill-opacity:1;" d="M 34.332031 21.140625 C 33.636719 21.042969 33.089844 20.792969 33.109375 20.578125 C 33.128906 20.363281 33.710938 20.261719 34.410156 20.355469 C 35.105469 20.449219 35.652344 20.703125 35.632812 20.917969 C 35.609375 21.136719 35.027344 21.234375 34.332031 21.140625 Z M 34.332031 21.140625 "/>
152<path style=" stroke:none;fill-rule:nonzero;fill:rgb(65.098039%,48.627451%,32.156863%);fill-opacity:1;" d="M 47.679688 0.0703125 L 0.132812 41.121094 C -0.808594 37.246094 3.113281 27.359375 16.261719 16.109375 C 29.410156 4.859375 44.128906 -0.484375 47.679688 0.0703125 Z M 47.679688 0.0703125 "/>
153<use xlink:href="#surface17" mask="url(#mask4)"/>
154<path style=" stroke:none;fill-rule:nonzero;fill:url(#linear1);" d="M 46.9375 0.707031 L 1.390625 40.039062 C 0.484375 36.316406 3.703125 27.363281 16.324219 16.5625 C 28.945312 5.761719 43.53125 0.175781 46.9375 0.707031 Z M 46.9375 0.707031 "/>
155<use xlink:href="#surface20" mask="url(#mask5)"/>
156<use xlink:href="#surface23" mask="url(#mask6)"/>
157<use xlink:href="#surface26" mask="url(#mask7)"/>
158<use xlink:href="#surface29" mask="url(#mask8)"/>
159<use xlink:href="#surface32" mask="url(#mask9)"/>
160<path style=" stroke:none;fill-rule:nonzero;fill:rgb(0%,0%,0%);fill-opacity:1;" d="M 15.21875 27.464844 C 15.816406 27.019531 16.324219 26.703125 16.351562 26.765625 C 16.375 26.824219 15.910156 27.234375 15.3125 27.679688 C 14.714844 28.125 14.207031 28.4375 14.183594 28.378906 C 14.15625 28.316406 14.621094 27.910156 15.21875 27.464844 Z M 15.21875 27.464844 "/>
161<path style=" stroke:none;fill-rule:nonzero;fill:rgb(0%,0%,0%);fill-opacity:1;" d="M 13.792969 27.207031 C 14.394531 26.832031 14.871094 26.597656 14.855469 26.6875 C 14.839844 26.773438 14.339844 27.148438 13.734375 27.519531 C 13.132812 27.894531 12.65625 28.125 12.671875 28.039062 C 12.6875 27.953125 13.191406 27.574219 13.792969 27.207031 Z M 13.792969 27.207031 "/>
162<path style=" stroke:none;fill-rule:nonzero;fill:rgb(0%,0%,0%);fill-opacity:1;" d="M 27.449219 14.4375 C 27.296875 14.816406 27.050781 15.199219 26.894531 15.28125 C 26.738281 15.367188 26.730469 15.128906 26.878906 14.746094 C 27.03125 14.367188 27.277344 13.988281 27.433594 13.90625 C 27.59375 13.824219 27.597656 14.058594 27.449219 14.4375 Z M 27.449219 14.4375 "/>
163<path style=" stroke:none;fill-rule:nonzero;fill:rgb(0%,0%,0%);fill-opacity:1;" d="M 24.867188 15.601562 C 24.816406 15.925781 24.640625 16.265625 24.480469 16.367188 C 24.320312 16.472656 24.230469 16.289062 24.28125 15.96875 C 24.332031 15.644531 24.503906 15.304688 24.664062 15.203125 C 24.828125 15.097656 24.917969 15.277344 24.867188 15.601562 Z M 24.867188 15.601562 "/>
164<path style=" stroke:none;fill-rule:nonzero;fill:rgb(0%,0%,0%);fill-opacity:1;" d="M 33.222656 10.664062 C 32.851562 11.136719 32.449219 11.554688 32.324219 11.59375 C 32.199219 11.632812 32.390625 11.277344 32.761719 10.800781 C 33.132812 10.324219 33.539062 9.90625 33.667969 9.871094 C 33.796875 9.832031 33.59375 10.1875 33.222656 10.664062 Z M 33.222656 10.664062 "/>
165<path style=" stroke:none;fill-rule:nonzero;fill:rgb(0%,0%,0%);fill-opacity:1;" d="M 15.445312 25.023438 C 16.007812 24.753906 16.417969 24.625 16.359375 24.738281 C 16.296875 24.851562 15.792969 25.160156 15.230469 25.429688 C 14.664062 25.699219 14.257812 25.824219 14.316406 25.714844 C 14.375 25.601562 14.882812 25.292969 15.445312 25.023438 Z M 15.445312 25.023438 "/>
166<use xlink:href="#surface35" mask="url(#mask10)"/>
167</g>
168</svg>
diff --git a/recipes/kiwiirc/index.js b/recipes/kiwiirc/index.js
new file mode 100644
index 0000000..dd41f72
--- /dev/null
+++ b/recipes/kiwiirc/index.js
@@ -0,0 +1 @@
module.exports = Ferdium => Ferdium;
diff --git a/recipes/kiwiirc/package.json b/recipes/kiwiirc/package.json
new file mode 100644
index 0000000..9c0b7b7
--- /dev/null
+++ b/recipes/kiwiirc/package.json
@@ -0,0 +1,10 @@
1{
2 "id": "kiwiirc",
3 "name": "KiwiIRC",
4 "version": "1.0.0",
5 "license": "MIT",
6 "config": {
7 "serviceURL": "https://kiwiirc.com/nextclient/",
8 "hasNotificationSound": true
9 }
10}
diff --git a/recipes/kiwiirc/service.css b/recipes/kiwiirc/service.css
new file mode 100644
index 0000000..2d8c1a6
--- /dev/null
+++ b/recipes/kiwiirc/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/kiwiirc/webview.js b/recipes/kiwiirc/webview.js
new file mode 100644
index 0000000..0c362f0
--- /dev/null
+++ b/recipes/kiwiirc/webview.js
@@ -0,0 +1,34 @@
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 = function getMessages() {
9 // eslint-disable-next-line no-undef
10 const unreadChannelsCount = kiwi.state.networks.reduce((count, network) => {
11 return (count += network.buffers.filter(buffer => {
12 return !buffer.name.startsWith('*') && buffer.flags.unread !== 0;
13 }).length);
14 }, 0);
15
16 // eslint-disable-next-line no-undef
17 const mentionedChannelsCount = kiwi.state.networks.reduce((count, network) => {
18 return (count += network.buffers.filter(buffer => {
19 return (
20 !buffer.name.startsWith('*') &&
21 buffer.flags.unread !== 0 &&
22 buffer.flags.highlight
23 );
24 }).length);
25 }, 0);
26
27 // set Ferdium badges
28 Ferdium.setBadge(mentionedChannelsCount, unreadChannelsCount);
29 };
30
31 Ferdium.loop(getMessages);
32
33 Ferdium.injectCSS(_path.default.join(__dirname, 'service.css'));
34};