From 6f5e4a00588aefdda7a5a1cfe70935870e7e234a Mon Sep 17 00:00:00 2001 From: Bennett Date: Tue, 22 Sep 2020 20:56:48 +0200 Subject: Unpack recipes and update recipes icons (#292) Co-authored-by: Amine Mouafik --- recipes/feedly/LICENSE | 21 +++++++++++++++++++++ recipes/feedly/README.md | 2 ++ recipes/feedly/feedly.css | 1 + recipes/feedly/icon.png | Bin 0 -> 29598 bytes recipes/feedly/icon.svg | 1 + recipes/feedly/index.js | 2 ++ recipes/feedly/package.json | 12 ++++++++++++ recipes/feedly/webview.js | 16 ++++++++++++++++ 8 files changed, 55 insertions(+) create mode 100644 recipes/feedly/LICENSE create mode 100644 recipes/feedly/README.md create mode 100644 recipes/feedly/feedly.css create mode 100644 recipes/feedly/icon.png create mode 100644 recipes/feedly/icon.svg create mode 100644 recipes/feedly/index.js create mode 100644 recipes/feedly/package.json create mode 100644 recipes/feedly/webview.js (limited to 'recipes/feedly') diff --git a/recipes/feedly/LICENSE b/recipes/feedly/LICENSE new file mode 100644 index 0000000..74d4100 --- /dev/null +++ b/recipes/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/recipes/feedly/README.md b/recipes/feedly/README.md new file mode 100644 index 0000000..92ad480 --- /dev/null +++ b/recipes/feedly/README.md @@ -0,0 +1,2 @@ +# Ferdi 5 Recipe: Feedly +This recipe integrates Feedly into Ferdi. diff --git a/recipes/feedly/feedly.css b/recipes/feedly/feedly.css new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/recipes/feedly/feedly.css @@ -0,0 +1 @@ + diff --git a/recipes/feedly/icon.png b/recipes/feedly/icon.png new file mode 100644 index 0000000..3d61fe9 Binary files /dev/null and b/recipes/feedly/icon.png differ diff --git a/recipes/feedly/icon.svg b/recipes/feedly/icon.svg new file mode 100644 index 0000000..1ed0a67 --- /dev/null +++ b/recipes/feedly/icon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/recipes/feedly/index.js b/recipes/feedly/index.js new file mode 100644 index 0000000..f6f75e3 --- /dev/null +++ b/recipes/feedly/index.js @@ -0,0 +1,2 @@ +"use strict"; +module.exports = Franz => Franz; \ No newline at end of file diff --git a/recipes/feedly/package.json b/recipes/feedly/package.json new file mode 100644 index 0000000..d7f7d73 --- /dev/null +++ b/recipes/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/recipes/feedly/webview.js b/recipes/feedly/webview.js new file mode 100644 index 0000000..c0f625d --- /dev/null +++ b/recipes/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-70-g09d2