From 8cb32825c2095d1f10f6960507e04980700f7450 Mon Sep 17 00:00:00 2001 From: Vijay A Date: Thu, 27 May 2021 21:47:20 +0530 Subject: Inoreader recipe from: https://github.com/annagrram/recipe-inoreader --- recipes/inoreader/LICENSE | 21 ++++++ recipes/inoreader/icon.png | Bin 0 -> 155511 bytes recipes/inoreader/icon.svg | 149 +++++++++++++++++++++++++++++++++++++++++ recipes/inoreader/index.js | 1 + recipes/inoreader/package.json | 14 ++++ recipes/inoreader/webview.js | 13 ++++ 6 files changed, 198 insertions(+) create mode 100644 recipes/inoreader/LICENSE create mode 100644 recipes/inoreader/icon.png create mode 100644 recipes/inoreader/icon.svg create mode 100644 recipes/inoreader/index.js create mode 100644 recipes/inoreader/package.json create mode 100644 recipes/inoreader/webview.js (limited to 'recipes/inoreader') diff --git a/recipes/inoreader/LICENSE b/recipes/inoreader/LICENSE new file mode 100644 index 0000000..b5fde1f --- /dev/null +++ b/recipes/inoreader/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2019 Anna Arad + +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. diff --git a/recipes/inoreader/icon.png b/recipes/inoreader/icon.png new file mode 100644 index 0000000..0e9fd01 Binary files /dev/null and b/recipes/inoreader/icon.png differ diff --git a/recipes/inoreader/icon.svg b/recipes/inoreader/icon.svg new file mode 100644 index 0000000..a61e4a7 --- /dev/null +++ b/recipes/inoreader/icon.svg @@ -0,0 +1,149 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + diff --git a/recipes/inoreader/index.js b/recipes/inoreader/index.js new file mode 100644 index 0000000..258da41 --- /dev/null +++ b/recipes/inoreader/index.js @@ -0,0 +1 @@ +module.exports = Franz => Franz; diff --git a/recipes/inoreader/package.json b/recipes/inoreader/package.json new file mode 100644 index 0000000..32159a4 --- /dev/null +++ b/recipes/inoreader/package.json @@ -0,0 +1,14 @@ +{ + "id": "inoreader", + "name": "Inoreader", + "version": "1.0.0", + "description": "The content reader for power users who want to save time.", + "main": "index.js", + "author": "Anna Arad ", + "license": "MIT", + "repository": "https://github.com/annagrram/recipe-inoreader", + "config": { + "serviceURL": "https://www.inoreader.com/login", + "message": "The content reader for power users who want to save time." + } +} diff --git a/recipes/inoreader/webview.js b/recipes/inoreader/webview.js new file mode 100644 index 0000000..a05abe2 --- /dev/null +++ b/recipes/inoreader/webview.js @@ -0,0 +1,13 @@ +module.exports = (Franz) => { + const getMessages = () => { + const all_articles = document.querySelector('#unread_cnt_all_items') + if (!all_articles) return; + + const unread_articles_cnt = Number(all_articles.textContent.split('+')[0]) + if (!Number.isNaN(unread_articles_cnt)) { + Franz.setBadge(unread_articles_cnt); + } + }; + + Franz.loop(getMessages); +} -- cgit v1.2.3-70-g09d2