aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/superhuman
diff options
context:
space:
mode:
authorLibravatar Vijay Aravamudhan <vraravam@users.noreply.github.com>2021-09-12 22:01:51 +0530
committerLibravatar Vijay A <avijayr@protonmail.com>2021-09-12 22:06:03 +0530
commit9db43e100a672b6d6932ac68c0fbe503c129138b (patch)
tree4f6a31d25a7345c5d92dbd8b80d30ce7d129944f /recipes/superhuman
parentNew recipe: 'stackoverflow' (#707) (diff)
downloadferdium-recipes-9db43e100a672b6d6932ac68c0fbe503c129138b.tar.gz
ferdium-recipes-9db43e100a672b6d6932ac68c0fbe503c129138b.tar.zst
ferdium-recipes-9db43e100a672b6d6932ac68c0fbe503c129138b.zip
Added a check to verify that the folder name of the recipe matches the recipe id (#708)
Use the recipe-id as master to rename internal folder names
Diffstat (limited to 'recipes/superhuman')
-rw-r--r--recipes/superhuman/LICENSE21
-rw-r--r--recipes/superhuman/icon.svg1
-rw-r--r--recipes/superhuman/index.js6
-rw-r--r--recipes/superhuman/package.json10
-rw-r--r--recipes/superhuman/webview.js8
5 files changed, 46 insertions, 0 deletions
diff --git a/recipes/superhuman/LICENSE b/recipes/superhuman/LICENSE
new file mode 100644
index 0000000..fcf56e2
--- /dev/null
+++ b/recipes/superhuman/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/icon.svg b/recipes/superhuman/icon.svg
new file mode 100644
index 0000000..faaa17f
--- /dev/null
+++ b/recipes/superhuman/icon.svg
@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="256" height="256" xml:space="preserve"><g fill-rule="evenodd" clip-rule="evenodd" fill="#6441A4"><path d="M255.21 5.351C255.227.695 253.7-.016 249.554 0c-37.656.148-75.313.087-112.969.087-37.99 0-75.98.045-113.97-.079-3.343-.011-5.013.911-6.235 4.102-4.82 12.587-9.907 25.073-14.965 37.567-.958 2.366-1.352 4.734-1.35 7.279C.099 107.94.134 166.924 0 225.907c-.009 4.117 1.005 5.332 5.213 5.28 18.825-.231 37.656-.014 56.482-.177 3.511-.029 4.559.981 4.472 4.484-.229 9.158.061 18.329-.146 27.488-.076 3.342 1.066 4.24 4.27 4.166 8.327-.191 16.662-.162 24.99-.007 2.731.051 4.667-.809 6.569-2.739 10.055-10.209 20.278-20.252 30.32-30.473 2.032-2.068 4.099-2.93 7.004-2.903 14.161.132 28.325-.017 42.487.12 3.057.029 5.271-.785 7.469-3a12316.607 12316.607 0 0 1 62.909-62.921c2.177-2.162 3.122-4.313 3.117-7.418-.092-50.818-.136-101.638.054-152.456zm-24.077 144.451c.003 2.365-.739 4.054-2.397 5.697-11.479 11.373-22.919 22.785-34.266 34.289-1.833 1.859-3.768 2.344-6.227 2.334-17.824-.066-35.65.093-53.473-.133-4.007-.051-6.833 1.053-9.607 3.916-10.189 10.518-20.609 20.813-32.073 32.326 0-11.346-.195-21.138.094-30.916.12-4.063-.885-5.411-5.167-5.333-14.821.271-29.651.005-44.475.177-3.43.04-4.533-.852-4.525-4.42.109-53.141.099-106.281.018-159.421-.005-3.148.744-4.303 4.124-4.298 61.303.094 122.606.096 183.909-.002 3.447-.005 4.084 1.258 4.077 4.345-.083 40.479-.071 80.96-.012 121.439z"/><path d="M126.091 103.574c0 9.822-.228 19.651.105 29.461.146 4.317-1.313 5.488-5.354 5.121-3.632-.33-7.335-.285-10.976-.009-3.563.27-4.911-.649-4.87-4.584.208-19.974.204-39.953.002-59.927-.04-3.892 1.237-4.885 4.841-4.613 3.807.287 7.682.359 11.474-.015 4.187-.414 4.936 1.388 4.852 5.102-.221 9.817-.074 19.642-.074 29.464zM189.088 103.242c.001 10.321-.106 20.644.065 30.962.053 3.093-.925 4.092-3.978 3.938-4.483-.225-8.993-.204-13.479-.007-2.887.127-3.664-.975-3.652-3.74.092-20.642.089-41.284.007-61.926-.011-2.624.865-3.508 3.454-3.421 4.656.156 9.327.187 13.98-.01 2.886-.122 3.688.973 3.653 3.741-.127 10.153-.05 20.308-.05 30.463z"/></g></svg> \ No newline at end of file
diff --git a/recipes/superhuman/index.js b/recipes/superhuman/index.js
new file mode 100644
index 0000000..44bc55d
--- /dev/null
+++ b/recipes/superhuman/index.js
@@ -0,0 +1,6 @@
1module.exports = Ferdi => class SuperHuman extends Ferdi {
2 overrideUserAgent() {
3 // TODO: Rather than hardcoding like this, the user should set it for their individual installation of Ferdi
4 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';
5 }
6};
diff --git a/recipes/superhuman/package.json b/recipes/superhuman/package.json
new file mode 100644
index 0000000..53509cb
--- /dev/null
+++ b/recipes/superhuman/package.json
@@ -0,0 +1,10 @@
1{
2 "id": "superhuman",
3 "name": "superhuman",
4 "version": "1.1.0",
5 "license": "MIT",
6 "repository": "https://github.com/CrystalLarsh/franz-superhuman-recipe",
7 "config": {
8 "hasCustomUrl": true
9 }
10}
diff --git a/recipes/superhuman/webview.js b/recipes/superhuman/webview.js
new file mode 100644
index 0000000..697efa6
--- /dev/null
+++ b/recipes/superhuman/webview.js
@@ -0,0 +1,8 @@
1module.exports = (Ferdi) => {
2 const getMessages = () => {
3 const mentions = document.querySelectorAll('.chat-line .mentioned').length;
4 Ferdi.setBadge(mentions, 0);
5 };
6
7 Ferdi.loop(getMessages);
8};