diff options
author | Tan <taniazuniga.mx@gmail.com> | 2020-05-09 15:56:08 -0500 |
---|---|---|
committer | Tan <taniazuniga.mx@gmail.com> | 2020-05-09 15:56:08 -0500 |
commit | 2995c7a86a982f60cbe9fae14bcfa8a232e95c1a (patch) | |
tree | e1e9468796a454cb909e080b4725d259f8ebfcb5 /uncompressed/notion | |
parent | Merge pull request #153 from dnlnrs/master (diff) | |
download | ferdium-recipes-2995c7a86a982f60cbe9fae14bcfa8a232e95c1a.tar.gz ferdium-recipes-2995c7a86a982f60cbe9fae14bcfa8a232e95c1a.tar.zst ferdium-recipes-2995c7a86a982f60cbe9fae14bcfa8a232e95c1a.zip |
Add Notion.so
Adds support for Notion.
Diffstat (limited to 'uncompressed/notion')
-rw-r--r-- | uncompressed/notion/README.md | 8 | ||||
-rw-r--r-- | uncompressed/notion/icon.png | bin | 0 -> 43926 bytes | |||
-rw-r--r-- | uncompressed/notion/icon.svg | 7 | ||||
-rw-r--r-- | uncompressed/notion/index.js | 3 | ||||
-rw-r--r-- | uncompressed/notion/package.json | 15 | ||||
-rw-r--r-- | uncompressed/notion/webview.js | 17 |
6 files changed, 50 insertions, 0 deletions
diff --git a/uncompressed/notion/README.md b/uncompressed/notion/README.md new file mode 100644 index 0000000..ac5c10a --- /dev/null +++ b/uncompressed/notion/README.md | |||
@@ -0,0 +1,8 @@ | |||
1 | # Ferdi-notion | ||
2 | A Notion recipe for Ferdi | ||
3 | |||
4 | ### Release notes | ||
5 | 1.0.0: First version | ||
6 | |||
7 | ### How to create your own Ferdi recipes: | ||
8 | * [Read the documentation](https://github.com/getferdi/recipes/blob/master/docs/integration.md) | ||
diff --git a/uncompressed/notion/icon.png b/uncompressed/notion/icon.png new file mode 100644 index 0000000..cb3b715 --- /dev/null +++ b/uncompressed/notion/icon.png | |||
Binary files differ | |||
diff --git a/uncompressed/notion/icon.svg b/uncompressed/notion/icon.svg new file mode 100644 index 0000000..58047ab --- /dev/null +++ b/uncompressed/notion/icon.svg | |||
@@ -0,0 +1,7 @@ | |||
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="1024pt" height="1024pt" viewBox="0 0 1024 1024" version="1.1"> | ||
3 | <g id="surface1"> | ||
4 | <path style=" stroke:none;fill-rule:nonzero;fill:rgb(100%,100%,100%);fill-opacity:1;" d="M 512 1024 C 794.769531 1024 1024 794.769531 1024 512 C 1024 229.230469 794.769531 0 512 0 C 229.230469 0 0 229.230469 0 512 C 0 794.769531 229.230469 1024 512 1024 Z M 512 1024 "/> | ||
5 | <path style=" stroke:none;fill-rule:evenodd;fill:rgb(0%,0%,0%);fill-opacity:1;" d="M 607.152344 193.460938 L 251.957031 219.597656 C 223.316406 222.074219 213.332031 240.746094 213.332031 263.128906 L 213.332031 651.339844 C 213.332031 668.78125 219.554688 683.691406 234.515625 703.617188 L 318.015625 811.867188 C 331.730469 829.300781 344.191406 833.027344 370.378906 831.78125 L 782.867188 806.890625 C 817.753906 804.414062 827.734375 788.226562 827.734375 760.851562 L 827.734375 324.105469 C 827.734375 309.957031 822.132812 305.867188 805.613281 293.820312 C 804.707031 293.160156 803.761719 292.472656 802.789062 291.757812 L 689.40625 212.125 C 661.992188 192.226562 650.769531 189.722656 607.152344 193.460938 Z M 379.734375 316.941406 C 346.054688 319.214844 338.402344 319.730469 319.277344 304.203125 L 270.644531 265.632812 C 265.683594 260.644531 268.171875 254.425781 280.628906 253.191406 L 622.109375 228.304688 C 650.761719 225.808594 665.714844 235.78125 676.9375 244.484375 L 735.507812 286.792969 C 738 288.035156 744.222656 295.488281 736.742188 295.488281 L 384.082031 316.652344 Z M 340.453125 757.113281 L 340.453125 386.332031 C 340.453125 370.160156 345.4375 362.6875 360.382812 361.429688 L 765.402344 337.796875 C 779.140625 336.554688 785.359375 345.269531 785.359375 361.429688 L 785.359375 729.726562 C 785.359375 745.914062 782.859375 759.621094 760.421875 760.851562 L 372.847656 783.265625 C 350.417969 784.496094 340.453125 777.042969 340.453125 757.113281 Z M 723.0625 406.222656 C 725.546875 417.429688 723.0625 428.628906 711.824219 429.890625 L 693.148438 433.609375 L 693.148438 707.34375 C 676.9375 716.050781 661.984375 721.03125 649.527344 721.03125 C 629.582031 721.03125 624.585938 714.804688 609.644531 696.148438 L 487.496094 504.535156 L 487.496094 689.929688 L 526.144531 698.644531 C 526.144531 698.644531 526.144531 721.03125 494.964844 721.03125 L 408.992188 726.015625 C 406.496094 721.03125 408.992188 708.597656 417.714844 706.105469 L 440.148438 699.894531 L 440.148438 454.765625 L 409 452.273438 C 406.5 441.066406 412.722656 424.902344 430.183594 423.648438 L 522.410156 417.4375 L 649.527344 611.546875 L 649.527344 439.828125 L 617.117188 436.113281 C 614.628906 422.410156 624.585938 412.457031 637.050781 411.222656 Z M 723.0625 406.222656 "/> | ||
6 | </g> | ||
7 | </svg> | ||
diff --git a/uncompressed/notion/index.js b/uncompressed/notion/index.js new file mode 100644 index 0000000..17daa35 --- /dev/null +++ b/uncompressed/notion/index.js | |||
@@ -0,0 +1,3 @@ | |||
1 | "use strict"; | ||
2 | |||
3 | module.exports = Franz => Franz; | ||
diff --git a/uncompressed/notion/package.json b/uncompressed/notion/package.json new file mode 100644 index 0000000..0911f2e --- /dev/null +++ b/uncompressed/notion/package.json | |||
@@ -0,0 +1,15 @@ | |||
1 | { | ||
2 | "id": "notion", | ||
3 | "name": "Notion", | ||
4 | "version": "1.0.0", | ||
5 | "description": "Notion", | ||
6 | "main": "index.js", | ||
7 | "author": "Tania R. Zuniga <tania@tanx.dev>", | ||
8 | "license": "MIT", | ||
9 | "repository": "https://github.com/TanZng/ferdi-notion", | ||
10 | "config": { | ||
11 | "serviceURL": "https://www.notion.so/", | ||
12 | "hasIndirectMessages": true, | ||
13 | "hasNotificationSound": true | ||
14 | } | ||
15 | } | ||
diff --git a/uncompressed/notion/webview.js b/uncompressed/notion/webview.js new file mode 100644 index 0000000..5308626 --- /dev/null +++ b/uncompressed/notion/webview.js | |||
@@ -0,0 +1,17 @@ | |||
1 | "use strict"; | ||
2 | |||
3 | module.exports = (Franz) => { | ||
4 | function getMessages() { | ||
5 | let direct = 0; | ||
6 | let indirect = 0; | ||
7 | const badgeDiv = document.querySelector('.notion-sidebar-container > div > div > div > :nth-child(4) > :nth-child(2) > div > :nth-child(3) > div > div'); | ||
8 | if (badgeDiv) { | ||
9 | const count = parseInt(badgeDiv.innerText); | ||
10 | direct = isNaN(count) ? 0 : count; | ||
11 | } | ||
12 | |||
13 | Franz.setBadge(direct, indirect); | ||
14 | } | ||
15 | |||
16 | Franz.loop(getMessages); | ||
17 | } | ||