diff options
Diffstat (limited to 'recipes/withspectrum')
-rw-r--r-- | recipes/withspectrum/index.js | 3 | ||||
-rw-r--r-- | recipes/withspectrum/package.json | 2 | ||||
-rw-r--r-- | recipes/withspectrum/webview.js | 7 |
3 files changed, 5 insertions, 7 deletions
diff --git a/recipes/withspectrum/index.js b/recipes/withspectrum/index.js index 71c0924..23607bd 100644 --- a/recipes/withspectrum/index.js +++ b/recipes/withspectrum/index.js | |||
@@ -1,2 +1 @@ | |||
1 | module.exports = Franz => Franz; | module.exports = Ferdi => Ferdi; | |
2 | // # sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndpdGhzcGVjdHJ1bS9pbmRleC5qcyJdLCJuYW1lcyI6WyJtb2R1bGUiLCJleHBvcnRzIiwiRnJhbnoiXSwibWFwcGluZ3MiOiI7O0FBQUFBLE9BQU9DLE9BQVAsR0FBaUJDLFNBQVNBLEtBQTFCIiwiZmlsZSI6IndpdGhzcGVjdHJ1bS9pbmRleC5qcyIsInNvdXJjZXNDb250ZW50IjpbIm1vZHVsZS5leHBvcnRzID0gRnJhbnogPT4gRnJhbnpcbiJdfQ== | ||
diff --git a/recipes/withspectrum/package.json b/recipes/withspectrum/package.json index fa5611b..ae1025c 100644 --- a/recipes/withspectrum/package.json +++ b/recipes/withspectrum/package.json | |||
@@ -1,7 +1,7 @@ | |||
1 | { | 1 | { |
2 | "id": "withspectrum", | 2 | "id": "withspectrum", |
3 | "name": "Spectrum", | 3 | "name": "Spectrum", |
4 | "version": "1.0.2", | 4 | "version": "1.1.0", |
5 | "license": "MIT", | 5 | "license": "MIT", |
6 | "config": { | 6 | "config": { |
7 | "serviceURL": "https://spectrum.chat" | 7 | "serviceURL": "https://spectrum.chat" |
diff --git a/recipes/withspectrum/webview.js b/recipes/withspectrum/webview.js index e50634c..0a3d9f3 100644 --- a/recipes/withspectrum/webview.js +++ b/recipes/withspectrum/webview.js | |||
@@ -1,12 +1,11 @@ | |||
1 | module.exports = Franz => { | 1 | module.exports = Ferdi => { |
2 | const getMessages = () => { | 2 | const getMessages = () => { |
3 | const element = document.querySelector('[href="/notifications"] > div'); | 3 | const element = document.querySelector('[href="/notifications"] > div'); |
4 | const content = window.getComputedStyle(element, ':after').getPropertyValue('content').match(/\d+/); | 4 | const content = window.getComputedStyle(element, ':after').getPropertyValue('content').match(/\d+/); |
5 | const notifications = Number(content); | 5 | const notifications = Number(content); |
6 | 6 | ||
7 | Franz.setBadge(notifications); | 7 | Ferdi.setBadge(notifications); |
8 | }; | 8 | }; |
9 | 9 | ||
10 | Franz.loop(getMessages); | 10 | Ferdi.loop(getMessages); |
11 | }; | 11 | }; |
12 | // # sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndpdGhzcGVjdHJ1bS93ZWJ2aWV3LmpzIl0sIm5hbWVzIjpbIm1vZHVsZSIsImV4cG9ydHMiLCJGcmFueiIsImdldE1lc3NhZ2VzIiwiZWxlbWVudCIsImRvY3VtZW50IiwicXVlcnlTZWxlY3RvciIsImNvbnRlbnQiLCJ3aW5kb3ciLCJnZXRDb21wdXRlZFN0eWxlIiwiZ2V0UHJvcGVydHlWYWx1ZSIsIm1hdGNoIiwibm90aWZpY2F0aW9ucyIsIk51bWJlciIsInNldEJhZGdlIiwibG9vcCJdLCJtYXBwaW5ncyI6Ijs7QUFBQUEsT0FBT0MsT0FBUCxHQUFpQkMsU0FBUztBQUN4QixRQUFNQyxjQUFjLE1BQU07QUFDeEIsVUFBTUMsVUFBVUMsU0FBU0MsYUFBVCxDQUF1QiwrQkFBdkIsQ0FBaEI7QUFDQSxVQUFNQyxVQUFVQyxPQUNiQyxnQkFEYSxDQUNJTCxPQURKLEVBQ2EsUUFEYixFQUViTSxnQkFGYSxDQUVJLFNBRkosRUFHYkMsS0FIYSxDQUdQLEtBSE8sQ0FBaEI7QUFJQSxVQUFNQyxnQkFBZ0JDLE9BQU9OLE9BQVAsQ0F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