aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/superhuman
diff options
context:
space:
mode:
Diffstat (limited to 'recipes/superhuman')
-rw-r--r--recipes/superhuman/index.js13
-rw-r--r--recipes/superhuman/package.json2
-rw-r--r--recipes/superhuman/webview.js10
3 files changed, 17 insertions, 8 deletions
diff --git a/recipes/superhuman/index.js b/recipes/superhuman/index.js
index 3cae124..c2d4bee 100644
--- a/recipes/superhuman/index.js
+++ b/recipes/superhuman/index.js
@@ -1,6 +1,7 @@
1module.exports = Ferdium => class SuperHuman extends Ferdium { 1module.exports = Ferdium =>
2 overrideUserAgent() { 2 class SuperHuman extends Ferdium {
3 // TODO: Rather than hardcoding like this, the user should set it for their individual installation of Ferdium 3 overrideUserAgent() {
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'; 4 // TODO: Rather than hardcoding like this, the user should set it for their individual installation of Ferdium
5 } 5 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}; 6 }
7 };
diff --git a/recipes/superhuman/package.json b/recipes/superhuman/package.json
index e4ea8ab..37283d8 100644
--- a/recipes/superhuman/package.json
+++ b/recipes/superhuman/package.json
@@ -1,7 +1,7 @@
1{ 1{
2 "id": "superhuman", 2 "id": "superhuman",
3 "name": "Superhuman", 3 "name": "Superhuman",
4 "version": "1.2.0", 4 "version": "1.3.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/webview.js b/recipes/superhuman/webview.js
index 0652545..6778fcd 100644
--- a/recipes/superhuman/webview.js
+++ b/recipes/superhuman/webview.js
@@ -1,8 +1,16 @@
1module.exports = (Ferdium) => { 1function _interopRequireDefault(obj) {
2 return obj && obj.__esModule ? obj : { default: obj };
3}
4
5const _path = _interopRequireDefault(require('path'));
6
7module.exports = Ferdium => {
2 const getMessages = () => { 8 const getMessages = () => {
3 const mentions = document.querySelectorAll('.chat-line .mentioned').length; 9 const mentions = document.querySelectorAll('.chat-line .mentioned').length;
4 Ferdium.setBadge(mentions, 0); 10 Ferdium.setBadge(mentions, 0);
5 }; 11 };
6 12
7 Ferdium.loop(getMessages); 13 Ferdium.loop(getMessages);
14
15 Ferdium.injectCSS(_path.default.join(__dirname, 'service.css'));
8}; 16};