From 53004ad979ca8be466b51c4ce39d1707f1bf8009 Mon Sep 17 00:00:00 2001 From: vantezzen Date: Fri, 27 Mar 2020 12:04:48 +0100 Subject: Add Any.do --- uncompressed/anydo/LICENSE | 21 +++++++++++++++++++++ uncompressed/anydo/README.md | 20 ++++++++++++++++++++ uncompressed/anydo/icon.png | Bin 0 -> 665210 bytes uncompressed/anydo/icon.svg | 22 ++++++++++++++++++++++ uncompressed/anydo/index.js | 3 +++ uncompressed/anydo/package.json | 13 +++++++++++++ uncompressed/anydo/webview.js | 20 ++++++++++++++++++++ 7 files changed, 99 insertions(+) create mode 100644 uncompressed/anydo/LICENSE create mode 100644 uncompressed/anydo/README.md create mode 100644 uncompressed/anydo/icon.png create mode 100644 uncompressed/anydo/icon.svg create mode 100644 uncompressed/anydo/index.js create mode 100644 uncompressed/anydo/package.json create mode 100644 uncompressed/anydo/webview.js (limited to 'uncompressed') diff --git a/uncompressed/anydo/LICENSE b/uncompressed/anydo/LICENSE new file mode 100644 index 0000000..20b7e42 --- /dev/null +++ b/uncompressed/anydo/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2020 Tom Chapman + +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/anydo/README.md b/uncompressed/anydo/README.md new file mode 100644 index 0000000..6322491 --- /dev/null +++ b/uncompressed/anydo/README.md @@ -0,0 +1,20 @@ +# recipe-anydo +Recipe for Any.do integration with Franz 5 + +## Installation +1. To install this plugin, download the zip [here](https://github.com/chappy84/recipe-anydo/archive/master.zip) +2. Open the file, and extract the contents to a folder e.g. `anydo` +3. Open the Franz Plugins folder on your machine (note that this `dev` directory may not exist yet, and you must create it): + * Mac: `~/Library/Application Support/Franz/recipes/dev/` + * Windows: `%appdata%/Franz/recipes/dev/` + * Linux: `~/.config/Franz/recipes/dev` +3. Copy the `anydo` folder created in step 2 into the plugins directory +4. Reload Franz + +### How to create your own Franz recipes: +* [Read the documentation](https://github.com/meetfranz/plugins) + +### Icon +Created by: [alecive](http://www.iconarchive.com/artist/alecive.html) +Sourced from: [Icon Archive](http://www.iconarchive.com/show/flatwoken-icons-by-alecive/apps-anydo-icon.html) +Released under [CC Attribution-Share Alike 4.0](http://creativecommons.org/licenses/by-sa/4.0/) diff --git a/uncompressed/anydo/icon.png b/uncompressed/anydo/icon.png new file mode 100644 index 0000000..22bf097 Binary files /dev/null and b/uncompressed/anydo/icon.png differ diff --git a/uncompressed/anydo/icon.svg b/uncompressed/anydo/icon.svg new file mode 100644 index 0000000..77fe087 --- /dev/null +++ b/uncompressed/anydo/icon.svg @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/uncompressed/anydo/index.js b/uncompressed/anydo/index.js new file mode 100644 index 0000000..a028916 --- /dev/null +++ b/uncompressed/anydo/index.js @@ -0,0 +1,3 @@ +"use strict"; +// just pass through Franz +module.exports = Franz => Franz; diff --git a/uncompressed/anydo/package.json b/uncompressed/anydo/package.json new file mode 100644 index 0000000..1a7bebd --- /dev/null +++ b/uncompressed/anydo/package.json @@ -0,0 +1,13 @@ +{ + "id": "anydo", + "name": "Any.do", + "version": "1.0.1", + "description": "Any.do plugin for Franz 5", + "main": "index.js", + "author": "Tom Chapman and The Ferdi Team ", + "license": "MIT", + "repository": "https://github.com/chappy84/recipe-anydo", + "config": { + "serviceURL": "https://desktop.any.do/" + } +} diff --git a/uncompressed/anydo/webview.js b/uncompressed/anydo/webview.js new file mode 100644 index 0000000..aaff6dc --- /dev/null +++ b/uncompressed/anydo/webview.js @@ -0,0 +1,20 @@ +"use strict"; + +module.exports = (Franz) => { + function getTasks() { + + let incompleteCount = 0; + + const countEls = document.querySelectorAll('.AppSidebarListsItems__itemContainer__sizeContainer:not([hidden]) > .AppSidebarListsItems__itemContainer__size'); + + if (countEls.length) { + Array.from(countEls).forEach((el) => { + incompleteCount += parseInt(el.innerHTML, 10); + }); + } + + Franz.setBadge(incompleteCount); + } + + Franz.loop(getTasks); +}; -- cgit v1.2.3-54-g00ecf