aboutsummaryrefslogtreecommitdiffstats
path: root/recipes
diff options
context:
space:
mode:
authorLibravatar Vijay A <avijayr@protonmail.com>2021-06-29 13:27:15 +0530
committerLibravatar Vijay Raghavan Aravamudhan <vraravam@users.noreply.github.com>2021-06-29 13:28:24 +0530
commit5e56414aa64b339dfdd817a8e49e08c5179d3bdd (patch)
treed2d966b8cafc80aa1d45920ae9de8e41ea85f05a /recipes
parentAdded new GH Actions workflow to welcome first time contributors. [skip ci] (diff)
downloadferdium-recipes-5e56414aa64b339dfdd817a8e49e08c5179d3bdd.tar.gz
ferdium-recipes-5e56414aa64b339dfdd817a8e49e08c5179d3bdd.tar.zst
ferdium-recipes-5e56414aa64b339dfdd817a8e49e08c5179d3bdd.zip
Adding new recipe: Superhuman (Fixes #573)
Diffstat (limited to 'recipes')
-rw-r--r--recipes/superhuman-email/LICENSE21
-rw-r--r--recipes/superhuman-email/README.md5
-rw-r--r--recipes/superhuman-email/icon.pngbin0 -> 750994 bytes
-rw-r--r--recipes/superhuman-email/icon.svg31
-rw-r--r--recipes/superhuman-email/index.js11
-rw-r--r--recipes/superhuman-email/package.json13
-rw-r--r--recipes/superhuman-email/webview.js13
7 files changed, 94 insertions, 0 deletions
diff --git a/recipes/superhuman-email/LICENSE b/recipes/superhuman-email/LICENSE
new file mode 100644
index 0000000..fcf56e2
--- /dev/null
+++ b/recipes/superhuman-email/LICENSE
@@ -0,0 +1,21 @@
1MIT License
2
3Copyright (c) 2021 CrystalLarsh
4
5Permission is hereby granted, free of charge, to any person obtaining a copy
6of this software and associated documentation files (the "Software"), to deal
7in the Software without restriction, including without limitation the rights
8to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9copies of the Software, and to permit persons to whom the Software is
10furnished to do so, subject to the following conditions:
11
12The above copyright notice and this permission notice shall be included in all
13copies or substantial portions of the Software.
14
15THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21SOFTWARE.
diff --git a/recipes/superhuman-email/README.md b/recipes/superhuman-email/README.md
new file mode 100644
index 0000000..d83f846
--- /dev/null
+++ b/recipes/superhuman-email/README.md
@@ -0,0 +1,5 @@
1# Custom Websites for Franz
2This is the official Franz recipe for adding Superhuman to Franz
3
4### How to create your own Franz recipes:
5* [Read the documentation](https://github.com/meetfranz/plugins)
diff --git a/recipes/superhuman-email/icon.png b/recipes/superhuman-email/icon.png
new file mode 100644
index 0000000..0229b72
--- /dev/null
+++ b/recipes/superhuman-email/icon.png
Binary files differ
diff --git a/recipes/superhuman-email/icon.svg b/recipes/superhuman-email/icon.svg
new file mode 100644
index 0000000..b27dc23
--- /dev/null
+++ b/recipes/superhuman-email/icon.svg
@@ -0,0 +1,31 @@
1<?xml version="1.0" encoding="utf-8"?>
2<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
4<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"
5 width="256px" height="256px" viewBox="0 0 256 256" enable-background="new 0 0 256 256"
6 xml:space="preserve">
7<g>
8 <path fill-rule="evenodd" clip-rule="evenodd" fill="#6441A4" d="M255.21,5.351c0.017-4.656-1.51-5.367-5.656-5.351
9 c-37.656,0.148-75.313,0.087-112.969,0.087c-37.99,0-75.98,0.045-113.97-0.079c-3.343-0.011-5.013,0.911-6.235,4.102
10 C11.56,16.697,6.473,29.183,1.415,41.677c-0.958,2.366-1.352,4.734-1.35,7.279C0.099,107.94,0.134,166.924,0,225.907
11 c-0.009,4.117,1.005,5.332,5.213,5.28c18.825-0.231,37.656-0.014,56.482-0.177c3.511-0.029,4.559,0.981,4.472,4.484
12 c-0.229,9.158,0.061,18.329-0.146,27.488c-0.076,3.342,1.066,4.24,4.27,4.166c8.327-0.191,16.662-0.162,24.99-0.007
13 c2.731,0.051,4.667-0.809,6.569-2.739c10.055-10.209,20.278-20.252,30.32-30.473c2.032-2.068,4.099-2.93,7.004-2.903
14 c14.161,0.132,28.325-0.017,42.487,0.12c3.057,0.029,5.271-0.785,7.469-3c20.891-21.053,41.867-42.02,62.909-62.921
15 c2.177-2.162,3.122-4.313,3.117-7.418C255.064,106.989,255.02,56.169,255.21,5.351z M231.133,149.802
16 c0.003,2.365-0.739,4.054-2.397,5.697c-11.479,11.373-22.919,22.785-34.266,34.289c-1.833,1.859-3.768,2.344-6.227,2.334
17 c-17.824-0.066-35.65,0.093-53.473-0.133c-4.007-0.051-6.833,1.053-9.607,3.916c-10.189,10.518-20.609,20.813-32.073,32.326
18 c0-11.346-0.195-21.138,0.094-30.916c0.12-4.063-0.885-5.411-5.167-5.333c-14.821,0.271-29.651,0.005-44.475,0.177
19 c-3.43,0.04-4.533-0.852-4.525-4.42c0.109-53.141,0.099-106.281,0.018-159.421c-0.005-3.148,0.744-4.303,4.124-4.298
20 c61.303,0.094,122.606,0.096,183.909-0.002c3.447-0.005,4.084,1.258,4.077,4.345C231.062,68.842,231.074,109.323,231.133,149.802z"
21 />
22 <path fill-rule="evenodd" clip-rule="evenodd" fill="#6441A4" d="M126.091,103.574c0,9.822-0.228,19.651,0.105,29.461
23 c0.146,4.317-1.313,5.488-5.354,5.121c-3.632-0.33-7.335-0.285-10.976-0.009c-3.563,0.27-4.911-0.649-4.87-4.584
24 c0.208-19.974,0.204-39.953,0.002-59.927c-0.04-3.892,1.237-4.885,4.841-4.613c3.807,0.287,7.682,0.359,11.474-0.015
25 c4.187-0.414,4.936,1.388,4.852,5.102C125.944,83.927,126.091,93.752,126.091,103.574z"/>
26 <path fill-rule="evenodd" clip-rule="evenodd" fill="#6441A4" d="M189.088,103.242c0.001,10.321-0.106,20.644,0.065,30.962
27 c0.053,3.093-0.925,4.092-3.978,3.938c-4.483-0.225-8.993-0.204-13.479-0.007c-2.887,0.127-3.664-0.975-3.652-3.74
28 c0.092-20.642,0.089-41.284,0.007-61.926c-0.011-2.624,0.865-3.508,3.454-3.421c4.656,0.156,9.327,0.187,13.98-0.01
29 c2.886-0.122,3.688,0.973,3.653,3.741C189.011,82.932,189.088,93.087,189.088,103.242z"/>
30</g>
31</svg>
diff --git a/recipes/superhuman-email/index.js b/recipes/superhuman-email/index.js
new file mode 100644
index 0000000..311ff8f
--- /dev/null
+++ b/recipes/superhuman-email/index.js
@@ -0,0 +1,11 @@
1// just pass through Franz - Superhuman tab appears, says needs Chrome
2// module.exports = Franz => Franz;
3
4// tried the whole string from the issue example - Superhuman tab appears, says needs Chrome
5// module.exports = Franz => class useragent extends Franz { overrideUserAgent() { return "Mozilla/5.0 (Windows NT 10.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.135 Safari/537.36 Edge/12.10136"; } };
6
7// updated class name to superhuman - Superhuman tab appears, says needs Chrome
8module.exports = Franz => class superhuman extends Franz { overrideUserAgent() { return "Mozilla/5.0 (Windows NT 10.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.135 Safari/537.36 Edge/12.10136"; } };
9
10// Tried shortening to just Chrome lol - Superhuman tab appears, says needs Chrome
11// module.exports = Franz => class superhuman extends Franz { overrideUserAgent() {return "Chrome"; } };
diff --git a/recipes/superhuman-email/package.json b/recipes/superhuman-email/package.json
new file mode 100644
index 0000000..8f0b2c5
--- /dev/null
+++ b/recipes/superhuman-email/package.json
@@ -0,0 +1,13 @@
1{
2 "id": "superhuman",
3 "name": "superhuman",
4 "version": "1.0.0",
5 "description": "View tool for Gmail",
6 "main": "index.js",
7 "author": "Crystal Larsh <crystal@tabletoppm.com>",
8 "license": "MIT",
9 "repository": "https://github.com/CrystalLarsh/franz-superhuman-recipe",
10 "config": {
11 "hasCustomUrl": true
12 }
13}
diff --git a/recipes/superhuman-email/webview.js b/recipes/superhuman-email/webview.js
new file mode 100644
index 0000000..2719e25
--- /dev/null
+++ b/recipes/superhuman-email/webview.js
@@ -0,0 +1,13 @@
1'use strict';
2
3module.exports = (Franz, options) => {
4 const getMessages = () => {
5 // Get the number of mentions
6 const mentions = document.querySelectorAll('.chat-line .mentioned').length;
7
8 Franz.setBadge(mentions, 0);
9 };
10 // check for new messages every second and update Franz badge
11 Franz.loop(getMessages);
12};
13//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInR3aXRjaC93ZWJ2aWV3LmpzIl0sIm5hbWVzIjpbIm1vZHVsZSIsImV4cG9ydHMiLCJGcmFueiIsIm9wdGlvbnMiLCJnZXRNZXNzYWdlcyIsIm1lbnRpb25zIiwiZG9jdW1lbnQiLCJxdWVyeVNlbGVjdG9yQWxsIiwibGVuZ3RoIiwic2V0QmFkZ2UiLCJsb29wIl0sIm1hcHBpbmdzIjoiOztBQUFBQSxPQUFPQyxPQUFQLEdBQWlCLENBQUNDLEtBQUQsRUFBUUMsT0FBUixLQUFvQjtBQUNuQyxRQUFNQyxjQUFjLE1BQU07QUFDeEI7QUFDQSxVQUFNQyxXQUFXQyxTQUFTQyxnQkFBVCxDQUEwQix1QkFBMUIsRUFBbURDLE1BQXBFOztBQUVBTixVQUFNTyxRQUFOLENBQWVKLFFBQWYsRUFBeUIsQ0FBekI7QUFDRCxHQUxEO0FBTUE7QUFDQUgsUUFBTVEsSUFBTixDQUFXTixXQUFYO0FBQ0QsQ0FURCIsImZpbGUiOiJ0d2l0Y2gvd2Vidmlldy5qcyIsInNvdXJjZXNDb250ZW50IjpbIm1vZHVsZS5leHBvcnRzID0gKEZyYW56LCBvcHRpb25zKSA9PiB7XG4gIGNvbnN0IGdldE1lc3NhZ2VzID0gKCkgPT4ge1xuICAgIC8vIEdldCB0aGUgbnVtYmVyIG9mIG1lbnRpb25zXG4gICAgY29uc3QgbWVudGlvbnMgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yQWxsKCcuY2hhdC1saW5lIC5tZW50aW9uZWQnKS5sZW5ndGg7XG5cbiAgICBGcmFuei5zZXRCYWRnZShtZW50aW9ucywgMCk7XG4gIH07XG4gIC8vIGNoZWNrIGZvciBuZXcgbWVzc2FnZXMgZXZlcnkgc2Vjb25kIGFuZCB1cGRhdGUgRnJhbnogYmFkZ2VcbiAgRnJhbnoubG9vcChnZXRNZXNzYWdlcyk7XG59O1xuIl19 \ No newline at end of file