aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/superhuman-email
diff options
context:
space:
mode:
Diffstat (limited to 'recipes/superhuman-email')
-rw-r--r--recipes/superhuman-email/index.js17
-rw-r--r--recipes/superhuman-email/package.json2
-rw-r--r--recipes/superhuman-email/webview.js11
3 files changed, 11 insertions, 19 deletions
diff --git a/recipes/superhuman-email/index.js b/recipes/superhuman-email/index.js
index 7277aa7..44bc55d 100644
--- a/recipes/superhuman-email/index.js
+++ b/recipes/superhuman-email/index.js
@@ -1,11 +1,6 @@
1// just pass through Franz - Superhuman tab appears, says needs Chrome 1module.exports = Ferdi => class SuperHuman extends Ferdi {
2// module.exports = Franz => Franz; 2 overrideUserAgent() {
3 3 // TODO: Rather than hardcoding like this, the user should set it for their individual installation of Ferdi
4// tried the whole string from the issue example - Superhuman tab appears, says needs Chrome 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// 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"; } }; 5 }
6 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
index 06eccfd..53509cb 100644
--- a/recipes/superhuman-email/package.json
+++ b/recipes/superhuman-email/package.json
@@ -1,7 +1,7 @@
1{ 1{
2 "id": "superhuman", 2 "id": "superhuman",
3 "name": "superhuman", 3 "name": "superhuman",
4 "version": "1.0.2", 4 "version": "1.1.0",
5 "license": "MIT", 5 "license": "MIT",
6 "repository": "https://github.com/CrystalLarsh/franz-superhuman-recipe", 6 "repository": "https://github.com/CrystalLarsh/franz-superhuman-recipe",
7 "config": { 7 "config": {
diff --git a/recipes/superhuman-email/webview.js b/recipes/superhuman-email/webview.js
index 8a6ba8e..697efa6 100644
--- a/recipes/superhuman-email/webview.js
+++ b/recipes/superhuman-email/webview.js
@@ -1,11 +1,8 @@
1module.exports = (Franz, options) => { 1module.exports = (Ferdi) => {
2 const getMessages = () => { 2 const getMessages = () => {
3 // Get the number of mentions
4 const mentions = document.querySelectorAll('.chat-line .mentioned').length; 3 const mentions = document.querySelectorAll('.chat-line .mentioned').length;
5 4 Ferdi.setBadge(mentions, 0);
6 Franz.setBadge(mentions, 0);
7 }; 5 };
8 // check for new messages every second and update Franz badge 6
9 Franz.loop(getMessages); 7 Ferdi.loop(getMessages);
10}; 8};
11// # sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInR3aXRjaC93ZWJ2aWV3LmpzIl0sIm5hbWVzIjpbIm1vZHVsZSIsImV4cG9ydHMiLCJGcmFueiIsIm9wdGlvbnMiLCJnZXRNZXNzYWdlcyIsIm1lbnRpb25zIiwiZG9jdW1lbnQiLCJxdWVyeVNlbGVjdG9yQWxsIiwibGVuZ3RoIiwic2V0QmFkZ2UiLCJsb29wIl0sIm1hcHBpbmdzIjoiOztBQUFBQSxPQUFPQyxPQUFQLEdBQWlCLENBQUNDLEtBQUQsRUFBUUMsT0FBUixLQUFvQjtBQUNuQyxRQUFNQyxjQUFjLE1BQU07QUFDeEI7QUFDQSxVQUFNQyxXQUFXQyxTQUFTQyxnQkFBVCxDQUEwQix1QkFBMUIsRUFBbURDLE1BQXBFOztBQUVBTixVQUFNTyxRQUFOLENBQWVKLFFBQWYsRUFBeUIsQ0FBekI7QUFDRCxHQUxEO0FBTUE7QUFDQUgsUUFBTVEsS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