diff options
author | Celedhrim <Celedhrim@users.noreply.github.com> | 2022-03-16 22:41:05 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-16 22:41:05 +0100 |
commit | 7337c3c428a67005944286d817826e15fe51fbf1 (patch) | |
tree | c84d52577d6224633eb8fc6fa518af322343bdd1 | |
parent | Bump ZenHub recipe version to 1.0.0 (diff) | |
download | ferdium-recipes-7337c3c428a67005944286d817826e15fe51fbf1.tar.gz ferdium-recipes-7337c3c428a67005944286d817826e15fe51fbf1.tar.zst ferdium-recipes-7337c3c428a67005944286d817826e15fe51fbf1.zip |
Add Tiny Tiny RSS recipe (#845)
-rw-r--r-- | recipes/tt-rss/README.md | 3 | ||||
-rw-r--r-- | recipes/tt-rss/icon.svg | 27 | ||||
-rw-r--r-- | recipes/tt-rss/index.js | 3 | ||||
-rw-r--r-- | recipes/tt-rss/package.json | 9 | ||||
-rw-r--r-- | recipes/tt-rss/webview.js | 21 |
5 files changed, 63 insertions, 0 deletions
diff --git a/recipes/tt-rss/README.md b/recipes/tt-rss/README.md new file mode 100644 index 0000000..a6620e5 --- /dev/null +++ b/recipes/tt-rss/README.md | |||
@@ -0,0 +1,3 @@ | |||
1 | # Tiny Tiny RSS for Ferdi | ||
2 | |||
3 | Support for [Tiny Tiny RSS](https://tt-rss.org/) | ||
diff --git a/recipes/tt-rss/icon.svg b/recipes/tt-rss/icon.svg new file mode 100644 index 0000000..e79dd54 --- /dev/null +++ b/recipes/tt-rss/icon.svg | |||
@@ -0,0 +1,27 @@ | |||
1 | <svg height="68" width="68" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> | ||
2 | <filter id="a" color-interpolation-filters="sRGB" height="1.095999" width="1.096001" x="-.048" y="-.048"> | ||
3 | <feGaussianBlur stdDeviation="1.2132931"/> | ||
4 | </filter> | ||
5 | <g filter="url(#a)" opacity=".5" transform="translate(42.411488 -17.074473)"> | ||
6 | <ellipse cx="-30.012384" cy="73.467369" rx="8.319641" ry="8.319806"/> | ||
7 | <path d="m1.879574 81.787172h-11.786158a28.425441 28.426004 0 0 0 -28.425441-28.426005v-11.786392a40.2116 40.212396 0 0 1 40.211599 40.212397z"/> | ||
8 | <g stroke-width="2.012547" transform="matrix(.34665172 0 0 .34665859 -53.584701 7.948892)"> | ||
9 | <path d="m184 213a140 140 0 0 0 -140-140v-35a175 175 0 0 1 175 175z"/> | ||
10 | <path d="m184 213a140 140 0 0 0 -140-140v-35a175 175 0 0 1 175 175z"/> | ||
11 | </g> | ||
12 | </g> | ||
13 | <g transform="translate(-1.933875 6.126728)"> | ||
14 | <g> | ||
15 | <ellipse cx="13.987616" cy="50.012821" fill="#ffa000" rx="8.319641" ry="8.319806"/> | ||
16 | <path d="m45.879574 58.332627h-11.786158a28.425441 28.426004 0 0 0 -28.4254415-28.426005v-11.786392a40.2116 40.212396 0 0 1 40.2115995 40.212397z" fill="#ff8f00"/> | ||
17 | <g fill="#ff6f00" stroke-width="2.012547" transform="matrix(.34665172 0 0 .34665859 -9.584701 -15.505653)"> | ||
18 | <path d="m184 213a140 140 0 0 0 -140-140v-35a175 175 0 0 1 175 175z"/> | ||
19 | <path d="m184 213a140 140 0 0 0 -140-140v-35a175 175 0 0 1 175 175z"/> | ||
20 | </g> | ||
21 | </g> | ||
22 | <g> | ||
23 | <path d="m51.33532 22.906446h-11.140249l-3.822177 15.064333q-.093222.511321-.233058 1.101308-.139836.589986-.279671 1.179973-.09323.589988-.186449 1.140642-.09322.511323-.09322.865315 0 1.573298.932239 2.320614.932237.747318 3.076385.747318.559343 0 1.398357-.117999.885628-.117997 1.771253-.314658.932239-.196663 1.771253-.393326.839014-.235995 1.351746-.393324l-2.283985 9.203795q-.839014.275328-2.050924.550655-1.211908.275327-2.656878.511322-1.44497.235994-3.029774.393324-1.538195.15733-3.029774.15733-3.542506 0-5.919715-.786649-2.377207-.747317-3.822177-2.08462-1.398357-1.376636-2.004311-3.18593-.559344-1.809293-.559344-3.933246 0-.629318.09322-1.455301.09322-.825982.23306-1.691295.186447-.865315.372896-1.730628.233058-.904647.419507-1.651964l3.822177-15.496989h-7.364683l2.610267-9.164463h7.038398l2.42382-9.4397891 15.521769-3.2252617-3.122999 12.6650508h11.326696l-2.563656 9.164463z" fill="#fff" stroke="#2b4265" stroke-width="3"/> | ||
24 | <path d="m-3.599816-11.724709h79.067383v79.195961h-79.067383z" fill="none" opacity=".5"/> | ||
25 | </g> | ||
26 | </g> | ||
27 | </svg> \ No newline at end of file | ||
diff --git a/recipes/tt-rss/index.js b/recipes/tt-rss/index.js new file mode 100644 index 0000000..cd5b37c --- /dev/null +++ b/recipes/tt-rss/index.js | |||
@@ -0,0 +1,3 @@ | |||
1 | "use strict"; | ||
2 | |||
3 | module.exports = Ferdi => Ferdi; | ||
diff --git a/recipes/tt-rss/package.json b/recipes/tt-rss/package.json new file mode 100644 index 0000000..bcfa970 --- /dev/null +++ b/recipes/tt-rss/package.json | |||
@@ -0,0 +1,9 @@ | |||
1 | { | ||
2 | "id": "tt-rss", | ||
3 | "name": "Tiny Tiny RSS", | ||
4 | "version": "1.0.0", | ||
5 | "license": "MIT", | ||
6 | "config": { | ||
7 | "hasCustomUrl": true | ||
8 | } | ||
9 | } | ||
diff --git a/recipes/tt-rss/webview.js b/recipes/tt-rss/webview.js new file mode 100644 index 0000000..1bb700a --- /dev/null +++ b/recipes/tt-rss/webview.js | |||
@@ -0,0 +1,21 @@ | |||
1 | "use strict"; | ||
2 | |||
3 | module.exports = Ferdi => { | ||
4 | const getMessages = function getMessages() { | ||
5 | // Initialize empty vars | ||
6 | var unread = 0; | ||
7 | var match = []; | ||
8 | // Extract the number from the title | ||
9 | match = document.title.match(/^\((\d+)\) Tiny Tiny RSS$/); | ||
10 | // Some logic to handle the match groups | ||
11 | unread = match != null && match.length > 0 ? match[1] : 0; | ||
12 | // Set unread msgs badge | ||
13 | Ferdi.setBadge(Number.parseInt(unread, 10)); | ||
14 | }; | ||
15 | |||
16 | const loopFunc = () => { | ||
17 | getMessages(); | ||
18 | }; | ||
19 | |||
20 | Ferdi.loop(loopFunc); | ||
21 | }; | ||