From 762edbc0c72dd53f4f50366a02c24b4d048f5e88 Mon Sep 17 00:00:00 2001 From: Patrick Kastner Date: Sat, 19 Sep 2020 15:09:00 -0400 Subject: Add Feedly recipe (#254) Co-authored-by: Amine --- all.json | 11 +++++++++++ archives/feedly.tar.gz | Bin 0 -> 60176 bytes uncompressed/feedly/LICENSE | 21 +++++++++++++++++++++ uncompressed/feedly/README.md | 2 ++ uncompressed/feedly/feedly.css | 1 + uncompressed/feedly/icon.png | Bin 0 -> 58852 bytes uncompressed/feedly/icon.svg | 1 + uncompressed/feedly/index.js | 2 ++ uncompressed/feedly/package.json | 12 ++++++++++++ uncompressed/feedly/webview.js | 16 ++++++++++++++++ 10 files changed, 66 insertions(+) create mode 100644 archives/feedly.tar.gz create mode 100644 uncompressed/feedly/LICENSE create mode 100644 uncompressed/feedly/README.md create mode 100644 uncompressed/feedly/feedly.css create mode 100644 uncompressed/feedly/icon.png create mode 100644 uncompressed/feedly/icon.svg create mode 100644 uncompressed/feedly/index.js create mode 100644 uncompressed/feedly/package.json create mode 100644 uncompressed/feedly/webview.js diff --git a/all.json b/all.json index 7b008ae..c515d35 100644 --- a/all.json +++ b/all.json @@ -230,6 +230,17 @@ "svg": "https://cdn.jsdelivr.net/gh/getferdi/recipes/uncompressed/fastmail/icon.svg" } }, + { + "author": "Patrick Kastner ", + "featured": false, + "id": "feedly", + "name": "Feedly", + "version": "1.0.0", + "icons": { + "png": "https://cdn.jsdelivr.net/gh/getferdi/recipes/uncompressed/feedly/icon.png", + "svg": "https://cdn.jsdelivr.net/gh/getferdi/recipes/uncompressed/feedly/icon.svg" + } + }, { "author": "Stefan Malzner ", "featured": false, diff --git a/archives/feedly.tar.gz b/archives/feedly.tar.gz new file mode 100644 index 0000000..9850382 Binary files /dev/null and b/archives/feedly.tar.gz differ diff --git a/uncompressed/feedly/LICENSE b/uncompressed/feedly/LICENSE new file mode 100644 index 0000000..74d4100 --- /dev/null +++ b/uncompressed/feedly/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2019 kastnerp + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/uncompressed/feedly/README.md b/uncompressed/feedly/README.md new file mode 100644 index 0000000..92ad480 --- /dev/null +++ b/uncompressed/feedly/README.md @@ -0,0 +1,2 @@ +# Ferdi 5 Recipe: Feedly +This recipe integrates Feedly into Ferdi. diff --git a/uncompressed/feedly/feedly.css b/uncompressed/feedly/feedly.css new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/uncompressed/feedly/feedly.css @@ -0,0 +1 @@ + diff --git a/uncompressed/feedly/icon.png b/uncompressed/feedly/icon.png new file mode 100644 index 0000000..de865bc Binary files /dev/null and b/uncompressed/feedly/icon.png differ diff --git a/uncompressed/feedly/icon.svg b/uncompressed/feedly/icon.svg new file mode 100644 index 0000000..57287f2 --- /dev/null +++ b/uncompressed/feedly/icon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/uncompressed/feedly/index.js b/uncompressed/feedly/index.js new file mode 100644 index 0000000..f6f75e3 --- /dev/null +++ b/uncompressed/feedly/index.js @@ -0,0 +1,2 @@ +"use strict"; +module.exports = Franz => Franz; \ No newline at end of file diff --git a/uncompressed/feedly/package.json b/uncompressed/feedly/package.json new file mode 100644 index 0000000..d7f7d73 --- /dev/null +++ b/uncompressed/feedly/package.json @@ -0,0 +1,12 @@ +{ + "id": "feedly", + "name": "Feedly", + "version": "1.0.0", + "description": "Feedly", + "main": "index.js", + "author": "Patrick Kastner ", + "license": "MIT", + "config": { + "serviceURL": "https://feedly.com" + } + } diff --git a/uncompressed/feedly/webview.js b/uncompressed/feedly/webview.js new file mode 100644 index 0000000..c0f625d --- /dev/null +++ b/uncompressed/feedly/webview.js @@ -0,0 +1,16 @@ +module.exports = Franz => { + + getMessages = () => { + const newsDOM = document.querySelectorAll("div[title='All'] > .LeftnavListRow__count")[0].innerHTML; + let counter = parseInt(newsDOM); + + if (newsDOM.indexOf('K') !== -1 || newsDOM.indexOf('+') !== -1) { + counter = newsDOM.substring(0, newsDOM.indexOf('K')) + '000'; + } + + Franz.setBadge(counter); + }; + + Franz.loop(getMessages); + +} \ No newline at end of file -- cgit v1.2.3-54-g00ecf