From 2995c7a86a982f60cbe9fae14bcfa8a232e95c1a Mon Sep 17 00:00:00 2001 From: Tan Date: Sat, 9 May 2020 15:56:08 -0500 Subject: Add Notion.so Adds support for Notion. --- all.json | 11 +++++++++++ archives/notion.tar.gz | Bin 0 -> 42762 bytes uncompressed/notion/README.md | 8 ++++++++ uncompressed/notion/icon.png | Bin 0 -> 43926 bytes uncompressed/notion/icon.svg | 7 +++++++ uncompressed/notion/index.js | 3 +++ uncompressed/notion/package.json | 15 +++++++++++++++ uncompressed/notion/webview.js | 17 +++++++++++++++++ 8 files changed, 61 insertions(+) create mode 100644 archives/notion.tar.gz create mode 100644 uncompressed/notion/README.md create mode 100644 uncompressed/notion/icon.png create mode 100644 uncompressed/notion/icon.svg create mode 100644 uncompressed/notion/index.js create mode 100644 uncompressed/notion/package.json create mode 100644 uncompressed/notion/webview.js diff --git a/all.json b/all.json index 6751500..9884ccf 100644 --- a/all.json +++ b/all.json @@ -593,6 +593,17 @@ "svg": "https://cdn.jsdelivr.net/gh/getferdi/recipes/uncompressed/nextdoor/icon.svg" } }, + { + "author": "Tania R. Zuniga ", + "featured": false, + "id": "notion", + "name": "Notion", + "version": "1.0.0", + "icons": { + "png": "https://cdn.jsdelivr.net/gh/getferdi/recipes/uncompressed/notion/icon.png", + "svg": "https://cdn.jsdelivr.net/gh/getferdi/recipes/uncompressed/notion/icon.svg" + } + }, { "author": "Adam Birds ", "featured": false, diff --git a/archives/notion.tar.gz b/archives/notion.tar.gz new file mode 100644 index 0000000..cbdbedd Binary files /dev/null and b/archives/notion.tar.gz differ 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 @@ +# Ferdi-notion +A Notion recipe for Ferdi + +### Release notes +1.0.0: First version + +### How to create your own Ferdi recipes: +* [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 Binary files /dev/null and b/uncompressed/notion/icon.png 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 @@ + + + + + + + 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 @@ +"use strict"; + +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 @@ +{ + "id": "notion", + "name": "Notion", + "version": "1.0.0", + "description": "Notion", + "main": "index.js", + "author": "Tania R. Zuniga ", + "license": "MIT", + "repository": "https://github.com/TanZng/ferdi-notion", + "config": { + "serviceURL": "https://www.notion.so/", + "hasIndirectMessages": true, + "hasNotificationSound": true + } +} 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 @@ +"use strict"; + +module.exports = (Franz) => { + function getMessages() { + let direct = 0; + let indirect = 0; + const badgeDiv = document.querySelector('.notion-sidebar-container > div > div > div > :nth-child(4) > :nth-child(2) > div > :nth-child(3) > div > div'); + if (badgeDiv) { + const count = parseInt(badgeDiv.innerText); + direct = isNaN(count) ? 0 : count; + } + + Franz.setBadge(direct, indirect); + } + + Franz.loop(getMessages); +} -- cgit v1.2.3-70-g09d2 From 7a1492afea82f2ad0359fc8ee49b4cf52c40af07 Mon Sep 17 00:00:00 2001 From: vantezzen Date: Sun, 10 May 2020 10:43:45 +0200 Subject: Repackage notion --- all.json | 2 +- archives/notion.tar.gz | Bin 42762 -> 42181 bytes uncompressed/notion/package.json | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/all.json b/all.json index 9884ccf..a9405de 100644 --- a/all.json +++ b/all.json @@ -598,7 +598,7 @@ "featured": false, "id": "notion", "name": "Notion", - "version": "1.0.0", + "version": "1.0.1", "icons": { "png": "https://cdn.jsdelivr.net/gh/getferdi/recipes/uncompressed/notion/icon.png", "svg": "https://cdn.jsdelivr.net/gh/getferdi/recipes/uncompressed/notion/icon.svg" diff --git a/archives/notion.tar.gz b/archives/notion.tar.gz index cbdbedd..9f6c7f2 100644 Binary files a/archives/notion.tar.gz and b/archives/notion.tar.gz differ diff --git a/uncompressed/notion/package.json b/uncompressed/notion/package.json index 0911f2e..d94b340 100644 --- a/uncompressed/notion/package.json +++ b/uncompressed/notion/package.json @@ -1,7 +1,7 @@ { "id": "notion", "name": "Notion", - "version": "1.0.0", + "version": "1.0.1", "description": "Notion", "main": "index.js", "author": "Tania R. Zuniga ", -- cgit v1.2.3-70-g09d2