aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/hackmd
diff options
context:
space:
mode:
authorLibravatar Vijay Raghavan Aravamudhan <vraravam@users.noreply.github.com>2021-08-27 18:13:24 +0530
committerLibravatar GitHub <noreply@github.com>2021-08-27 18:13:24 +0530
commit155c4b832281348c16be1f4ef667e6e23dbf1bd8 (patch)
treed144e2de2e6c7fb2e334246e8a4aecdbeb08ef8d /recipes/hackmd
parentdocs: fixed template file for creating recipe. (diff)
downloadferdium-recipes-155c4b832281348c16be1f4ef667e6e23dbf1bd8.tar.gz
ferdium-recipes-155c4b832281348c16be1f4ef667e6e23dbf1bd8.tar.zst
ferdium-recipes-155c4b832281348c16be1f4ef667e6e23dbf1bd8.zip
chore: normalized all recipes to ensure compatibility with es6 (#639)
- Removed some calls to set badge with '0' all the time. - Removed all 'sourceMaps' since they are all outdated atm.
Diffstat (limited to 'recipes/hackmd')
-rw-r--r--recipes/hackmd/index.js3
-rw-r--r--recipes/hackmd/package.json2
-rw-r--r--recipes/hackmd/webview.js15
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
3module.exports = Franz => class HackMd extends Franz { 2module.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 @@
1const path = require('path'); 1const _path = _interopRequireDefault(require('path'));
2 2
3module.exports = (Franz) => { 3function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
4
5module.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};