diff options
Diffstat (limited to 'recipes/hackmd')
-rw-r--r-- | recipes/hackmd/index.js | 3 | ||||
-rw-r--r-- | recipes/hackmd/package.json | 2 | ||||
-rw-r--r-- | recipes/hackmd/webview.js | 15 |
3 files changed, 10 insertions, 10 deletions
diff --git a/recipes/hackmd/index.js b/recipes/hackmd/index.js index 46335da..c3d5c52 100644 --- a/recipes/hackmd/index.js +++ b/recipes/hackmd/index.js | |||
@@ -1,4 +1,3 @@ | |||
1 | // just pass through Franz | ||
2 | // todo allow custom url | 1 | // todo allow custom url |
3 | module.exports = Franz => class HackMd extends Franz { | 2 | module.exports = Ferdi => class HackMd extends Ferdi { |
4 | }; | 3 | }; |
diff --git a/recipes/hackmd/package.json b/recipes/hackmd/package.json index 6da2d32..708da11 100644 --- a/recipes/hackmd/package.json +++ b/recipes/hackmd/package.json | |||
@@ -1,7 +1,7 @@ | |||
1 | { | 1 | { |
2 | "id": "hackmd", | 2 | "id": "hackmd", |
3 | "name": "HackMd", | 3 | "name": "HackMd", |
4 | "version": "1.0.2", | 4 | "version": "1.1.0", |
5 | "license": "MIT", | 5 | "license": "MIT", |
6 | "config": { | 6 | "config": { |
7 | "serviceURL": "https://hackmd.io", | 7 | "serviceURL": "https://hackmd.io", |
diff --git a/recipes/hackmd/webview.js b/recipes/hackmd/webview.js index 45cec03..82ce58d 100644 --- a/recipes/hackmd/webview.js +++ b/recipes/hackmd/webview.js | |||
@@ -1,17 +1,18 @@ | |||
1 | const path = require('path'); | 1 | const _path = _interopRequireDefault(require('path')); |
2 | 2 | ||
3 | module.exports = (Franz) => { | 3 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } |
4 | |||
5 | module.exports = (Ferdi) => { | ||
4 | const getMessages = function getMessages() { | 6 | const getMessages = function getMessages() { |
5 | // get unread messages | 7 | // get unread messages |
6 | const count = document.querySelectorAll('.guilds-wrapper .badge').length; | 8 | const count = document.querySelectorAll('.guilds-wrapper .badge').length; |
7 | 9 | ||
8 | // set Franz badge | 10 | // set Ferdi badge |
9 | Franz.setBadge(count); | 11 | Ferdi.setBadge(count); |
10 | }; | 12 | }; |
11 | 13 | ||
12 | // check for new messages every second and update Franz badge | 14 | Ferdi.loop(getMessages); |
13 | Franz.loop(getMessages); | ||
14 | 15 | ||
15 | // Hide download message | 16 | // Hide download message |
16 | Franz.injectCSS(path.join(__dirname, 'service.css')); | 17 | Ferdi.injectCSS(_path.default.join(__dirname, 'service.css')); |
17 | }; | 18 | }; |