From 728d339739b63e9bb59e457e4a84fe9a65b93fc9 Mon Sep 17 00:00:00 2001 From: vantezzen Date: Sat, 28 Sep 2019 12:10:25 +0200 Subject: Add uncompressed recipes --- uncompressed/todoist/LICENSE | 21 +++++++++++++++++++++ uncompressed/todoist/README.md | 5 +++++ uncompressed/todoist/icon.svg | 28 ++++++++++++++++++++++++++++ uncompressed/todoist/index.js | 3 +++ uncompressed/todoist/package.json | 14 ++++++++++++++ uncompressed/todoist/webview.js | 22 ++++++++++++++++++++++ 6 files changed, 93 insertions(+) create mode 100644 uncompressed/todoist/LICENSE create mode 100644 uncompressed/todoist/README.md create mode 100644 uncompressed/todoist/icon.svg create mode 100644 uncompressed/todoist/index.js create mode 100644 uncompressed/todoist/package.json create mode 100644 uncompressed/todoist/webview.js (limited to 'uncompressed/todoist') diff --git a/uncompressed/todoist/LICENSE b/uncompressed/todoist/LICENSE new file mode 100644 index 0000000..f0472f5 --- /dev/null +++ b/uncompressed/todoist/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2017 Mike Burke + +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/uncompressed/todoist/README.md b/uncompressed/todoist/README.md new file mode 100644 index 0000000..e94ee80 --- /dev/null +++ b/uncompressed/todoist/README.md @@ -0,0 +1,5 @@ +# recipe-todoist +Recipe for Todoist integration with Franz 5 + +### How to create your own Franz recipes: +* [Read the documentation](https://github.com/meetfranz/plugins) diff --git a/uncompressed/todoist/icon.svg b/uncompressed/todoist/icon.svg new file mode 100644 index 0000000..c9b6828 --- /dev/null +++ b/uncompressed/todoist/icon.svg @@ -0,0 +1,28 @@ + + + + +Created by potrace 1.13, written by Peter Selinger 2001-2015 + + + + + diff --git a/uncompressed/todoist/index.js b/uncompressed/todoist/index.js new file mode 100644 index 0000000..e8243fb --- /dev/null +++ b/uncompressed/todoist/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = Franz => Franz; \ No newline at end of file diff --git a/uncompressed/todoist/package.json b/uncompressed/todoist/package.json new file mode 100644 index 0000000..4cf557a --- /dev/null +++ b/uncompressed/todoist/package.json @@ -0,0 +1,14 @@ +{ + "id": "todoist", + "name": "Todoist", + "version": "1.1.0", + "description": "todoist plugin for Franz 5", + "main": "index.js", + "author": "Alex Ward , Mike Burke ", + "license": "MIT", + "repository": "https://github.com/meetfranz/recipe-todoist", + "config": { + "serviceURL": "https://todoist.com/app", + "hasIndirectMessages": true + } +} diff --git a/uncompressed/todoist/webview.js b/uncompressed/todoist/webview.js new file mode 100644 index 0000000..3263348 --- /dev/null +++ b/uncompressed/todoist/webview.js @@ -0,0 +1,22 @@ +"use strict"; + +module.exports = (Franz, options) => { + function getTasks() { + let todayCount = 0; + let inboxCount = 0; + const todayElement = document.querySelector("#top_filters .counter.overdue_color"); + const inboxElement = document.querySelector("#filter_inbox .counter"); + + if (todayElement) { + todayCount = parseInt(todayElement.innerHTML, 10); + } + + if (inboxElement) { + inboxCount = parseInt(inboxElement.innerHTML, 10); + } + + Franz.setBadge(inboxCount, todayCount); + } + + Franz.loop(getTasks); +}; \ No newline at end of file -- cgit v1.2.3-70-g09d2