diff options
Diffstat (limited to 'recipes/ntfy')
-rw-r--r-- | recipes/ntfy/icon.svg | 1 | ||||
-rw-r--r-- | recipes/ntfy/index.js | 1 | ||||
-rw-r--r-- | recipes/ntfy/package.json | 17 | ||||
-rw-r--r-- | recipes/ntfy/webview.js | 14 |
4 files changed, 33 insertions, 0 deletions
diff --git a/recipes/ntfy/icon.svg b/recipes/ntfy/icon.svg new file mode 100644 index 0000000..9e5b513 --- /dev/null +++ b/recipes/ntfy/icon.svg | |||
@@ -0,0 +1 @@ | |||
<svg width="50mm" height="50mm" viewBox="0 0 50 50" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg"><defs><linearGradient id="a"><stop style="stop-color:#348878;stop-opacity:1" offset="0"/><stop style="stop-color:#56bda8;stop-opacity:1" offset="1"/></linearGradient><linearGradient xlink:href="#a" id="b" x1="160.722" y1="128.533" x2="168.412" y2="134.326" gradientUnits="userSpaceOnUse" gradientTransform="translate(-845.726 -630.598) scale(5.59448)"/></defs><g style="display:inline"><path style="color:#000;fill:url(#b);stroke:none;stroke-width:3.72347;-inkscape-stroke:none" d="M94.237 89.912H59.499c-2.388 0-4.342 1.844-4.342 4.098l.033 27.754-.648 3.738 9.297-2.806h30.396c2.388 0 4.342-1.845 4.342-4.099V94.01c0-2.254-1.954-4.098-4.342-4.098z" transform="translate(-51.147 -81.516)"/><path style="color:#000;fill:#fff;stroke:none;stroke-width:.762343;-inkscape-stroke:none" d="M58.849 86.79c-3.62 0-6.72 2.848-6.72 6.47v.002l.035 30.273-.91 6.708 12.362-3.284h30.729c3.62 0 6.72-2.852 6.72-6.473V93.26c0-3.62-3.099-6.469-6.717-6.469h-.003zm0 4.566h35.499c1.272 0 2.151.927 2.151 1.903v27.227c0 .977-.88 1.924-2.154 1.903h-31.4l-6.28 1.898.065-.37-.035-30.658c0-.977.88-1.903 2.154-1.903z" transform="translate(-51.147 -81.516)"/><g style="font-size:8.48274px;font-family:sans-serif;letter-spacing:0;word-spacing:0;fill:#000;stroke:none;stroke-width:.525121"><path style="color:#000;-inkscape-font-specification:'JetBrains Mono, Bold';fill:#fff;stroke:none;-inkscape-stroke:none" d="M62.57 116.77v-1.312l3.28-1.459q.159-.068.306-.102.158-.045.283-.068l.271-.022v-.09q-.136-.012-.271-.046-.125-.023-.283-.057-.147-.045-.306-.113l-3.28-1.459v-1.323l5.068 2.319v1.413z" transform="matrix(2.1689 0 0 2.57844 -124.28 -268.742)"/><path style="color:#000;-inkscape-font-specification:'JetBrains Mono, Bold';fill:#fff;stroke:none;-inkscape-stroke:none" d="M62.309 110.31v1.903l3.437 1.53.022.007-.022.008-3.437 1.53v1.892l.37-.17 5.221-2.39v-1.75zm.525.817 4.541 2.08v1.076l-4.541 2.078v-.732l3.12-1.389.003-.002a1.56 1.56 0 0 1 .258-.086h.006l.008-.002c.094-.027.176-.047.246-.06l.498-.041v-.574l-.24-.02a1.411 1.411 0 0 1-.231-.04l-.008-.001-.008-.002a9.077 9.077 0 0 1-.263-.053 2.781 2.781 0 0 1-.266-.097l-.004-.002-3.119-1.39z" transform="matrix(2.1689 0 0 2.57844 -124.28 -268.742)"/></g><g style="font-size:8.48274px;font-family:sans-serif;letter-spacing:0;word-spacing:0;fill:#000;stroke:none;stroke-width:.525121"><path style="color:#000;-inkscape-font-specification:'JetBrains Mono, Bold';fill:#fff;stroke:none;-inkscape-stroke:none" d="M69.171 117.754h5.43v1.278h-5.43Z" transform="matrix(2.16247 0 0 2.48294 -122.76 -261.211)"/><path style="color:#000;-inkscape-font-specification:'JetBrains Mono, Bold';fill:#fff;stroke:none;-inkscape-stroke:none" d="M68.908 117.492v1.802h5.955v-1.802zm.526.524h4.904v.754h-4.904z" transform="matrix(2.16247 0 0 2.48294 -122.76 -261.211)"/></g></g></svg> \ No newline at end of file | |||
diff --git a/recipes/ntfy/index.js b/recipes/ntfy/index.js new file mode 100644 index 0000000..8244b1b --- /dev/null +++ b/recipes/ntfy/index.js | |||
@@ -0,0 +1 @@ | |||
module.exports = Ferdium => Ferdium; \ No newline at end of file | |||
diff --git a/recipes/ntfy/package.json b/recipes/ntfy/package.json new file mode 100644 index 0000000..76771b0 --- /dev/null +++ b/recipes/ntfy/package.json | |||
@@ -0,0 +1,17 @@ | |||
1 | { | ||
2 | "id": "ntfy", | ||
3 | "name": "ntfy", | ||
4 | "version": "1.0.0", | ||
5 | "license": "MIT", | ||
6 | "aliases": [ | ||
7 | "Notify" | ||
8 | ], | ||
9 | "config": { | ||
10 | "serviceURL": "https://ntfy.sh/app", | ||
11 | "hasCustomUrl": true, | ||
12 | "message": "ntfy lets you send push notifications to your phone or desktop via scripts from any computer, using simple HTTP PUT or POST requests.", | ||
13 | "hasNotificationSound": true, | ||
14 | "hasDirectMessages": true, | ||
15 | "hasIndirectMessages": false | ||
16 | } | ||
17 | } | ||
diff --git a/recipes/ntfy/webview.js b/recipes/ntfy/webview.js new file mode 100644 index 0000000..45b8d2d --- /dev/null +++ b/recipes/ntfy/webview.js | |||
@@ -0,0 +1,14 @@ | |||
1 | module.exports = (Ferdium) => { | ||
2 | const getMessages = () => { | ||
3 | let msgRaw = document.title.match(/\(\d*\)/); | ||
4 | let messages = 0; | ||
5 | |||
6 | if (msgRaw) { | ||
7 | messages = Ferdium.safeParseInt(msgRaw[0].slice(1)); | ||
8 | } | ||
9 | |||
10 | Ferdium.setBadge(messages, 0); | ||
11 | } | ||
12 | |||
13 | Ferdium.loop(getMessages); | ||
14 | }; \ No newline at end of file | ||