diff options
Diffstat (limited to 'recipes/evernote')
-rw-r--r-- | recipes/evernote/LICENSE | 21 | ||||
-rw-r--r-- | recipes/evernote/README.md | 20 | ||||
-rw-r--r-- | recipes/evernote/css/franz.css | 3 | ||||
-rw-r--r-- | recipes/evernote/icon.png | bin | 0 -> 35444 bytes | |||
-rw-r--r-- | recipes/evernote/icon.svg | 13 | ||||
-rw-r--r-- | recipes/evernote/index.js | 2 | ||||
-rw-r--r-- | recipes/evernote/package.json | 13 | ||||
-rw-r--r-- | recipes/evernote/webview.js | 18 |
8 files changed, 90 insertions, 0 deletions
diff --git a/recipes/evernote/LICENSE b/recipes/evernote/LICENSE new file mode 100644 index 0000000..7c2e393 --- /dev/null +++ b/recipes/evernote/LICENSE | |||
@@ -0,0 +1,21 @@ | |||
1 | MIT License | ||
2 | |||
3 | Copyright (c) 2018 Connor | ||
4 | |||
5 | Permission is hereby granted, free of charge, to any person obtaining a copy | ||
6 | of this software and associated documentation files (the "Software"), to deal | ||
7 | in the Software without restriction, including without limitation the rights | ||
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
9 | copies of the Software, and to permit persons to whom the Software is | ||
10 | furnished to do so, subject to the following conditions: | ||
11 | |||
12 | The above copyright notice and this permission notice shall be included in all | ||
13 | copies or substantial portions of the Software. | ||
14 | |||
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
21 | SOFTWARE. | ||
diff --git a/recipes/evernote/README.md b/recipes/evernote/README.md new file mode 100644 index 0000000..11dc447 --- /dev/null +++ b/recipes/evernote/README.md | |||
@@ -0,0 +1,20 @@ | |||
1 | # Evernote for Franz | ||
2 | This is the Franz 5 Recipe for Evernote | ||
3 | |||
4 | ## Requirements | ||
5 | This recipe only works for Franz 5.X, find it at http://meetfranz.com | ||
6 | |||
7 | ## Installation | ||
8 | |||
9 | 1. Clone/download the folder `franz-recipe-evernote`. | ||
10 | |||
11 | 2. Open the Franz Recipe folder on your machine: | ||
12 | * Mac: `~/Library/Application Support/Franz/recipes/` | ||
13 | * Windows: `%appdata%/Franz/recipes/` | ||
14 | * Linux: `~/.config/Franz/recipes/` | ||
15 | |||
16 | 3. Create a `dev` folder if you have not already done so | ||
17 | |||
18 | 3. Unzip and copy the `franz-recipe-evernote` folder into the recipes dev directory | ||
19 | |||
20 | 4. Restart or reload Franz | ||
diff --git a/recipes/evernote/css/franz.css b/recipes/evernote/css/franz.css new file mode 100644 index 0000000..09e72fb --- /dev/null +++ b/recipes/evernote/css/franz.css | |||
@@ -0,0 +1,3 @@ | |||
1 | footer { | ||
2 | display: none !important; | ||
3 | } | ||
diff --git a/recipes/evernote/icon.png b/recipes/evernote/icon.png new file mode 100644 index 0000000..39ee6d6 --- /dev/null +++ b/recipes/evernote/icon.png | |||
Binary files differ | |||
diff --git a/recipes/evernote/icon.svg b/recipes/evernote/icon.svg new file mode 100644 index 0000000..229d72e --- /dev/null +++ b/recipes/evernote/icon.svg | |||
@@ -0,0 +1,13 @@ | |||
1 | <?xml version="1.0" encoding="utf-8"?> | ||
2 | <!-- Generator: Adobe Illustrator 22.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> | ||
3 | <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" | ||
4 | viewBox="0 0 148 148" style="enable-background:new 0 0 148 148;" xml:space="preserve"> | ||
5 | <g transform="translate(0.000000,140.000000) scale(0.100000,-0.100000)"> | ||
6 | <path d="M623.3,1195c-24-23-25-30-25-145c0-161,1-160-156-160c-63,0-124-4-134-10c-36-19-41-67-21-168c31-149,66-204,164-253 | ||
7 | c53-28,152-42,194-28c34,11,64,51,86,115l14,38l18-31c21-36,74-68,130-78c86-15,135-66,135-138c0-31-7-46-34-73c-44-44-94-47-132-9 | ||
8 | c-24,24-25,28-11,48c8,12,24,23,36,25c29,5,45,36,31,62c-23,43-119,11-152-51c-52-96,16-195,142-207c110-10,218,62,259,174 | ||
9 | c32,84,45,265,32,438c-15,192-28,261-58,297c-37,44-67,56-201,80c-106,20-122,25-131,46C785.3,1220,666.3,1239,623.3,1195z | ||
10 | M1056.3,738c7-7,12-21,12-31c0-18-5-19-52-13c-63,9-75,18-53,40C982.3,753,1039.3,755,1056.3,738z"/> | ||
11 | <path d="M438.3,1045l-125-125h110c61,0,117,5,125,10c11,7,16,33,18,97C573.3,1189,581.3,1188,438.3,1045z"/> | ||
12 | </g> | ||
13 | </svg> | ||
diff --git a/recipes/evernote/index.js b/recipes/evernote/index.js new file mode 100644 index 0000000..46f936f --- /dev/null +++ b/recipes/evernote/index.js | |||
@@ -0,0 +1,2 @@ | |||
1 | // just pass through Franz | ||
2 | module.exports = Franz => Franz; | ||
diff --git a/recipes/evernote/package.json b/recipes/evernote/package.json new file mode 100644 index 0000000..fb9d0ba --- /dev/null +++ b/recipes/evernote/package.json | |||
@@ -0,0 +1,13 @@ | |||
1 | { | ||
2 | "id": "evernote", | ||
3 | "name": "Evernote", | ||
4 | "version": "1.0.0", | ||
5 | "description": "Evernote", | ||
6 | "main": "index.js", | ||
7 | "author": "concon", | ||
8 | "license": "MIT", | ||
9 | "config": { | ||
10 | "serviceURL": "https://www.evernote.com/Login.action", | ||
11 | "hasTeamID": false | ||
12 | } | ||
13 | } \ No newline at end of file | ||
diff --git a/recipes/evernote/webview.js b/recipes/evernote/webview.js new file mode 100644 index 0000000..60742ca --- /dev/null +++ b/recipes/evernote/webview.js | |||
@@ -0,0 +1,18 @@ | |||
1 | const path = require('path'); | ||
2 | |||
3 | module.exports = (Franz, options) => { | ||
4 | const getMessages = () => { | ||
5 | const inbox = document.querySelector('.topbar-notificationsButton.has-newNotifications'); | ||
6 | const passiveCount = inbox === null ? 0 : 1; | ||
7 | // set Franz badge | ||
8 | // updates => active unread count | ||
9 | // inbox => passive unread count | ||
10 | Franz.setBadge(0, passiveCount); | ||
11 | }; | ||
12 | |||
13 | // inject franz.css stylesheet | ||
14 | Franz.injectCSS(path.join(__dirname, 'css', 'franz.css')); | ||
15 | |||
16 | // check for new messages every second and update Franz badge | ||
17 | Franz.loop(getMessages); | ||
18 | }; | ||