From 155c4b832281348c16be1f4ef667e6e23dbf1bd8 Mon Sep 17 00:00:00 2001 From: Vijay Raghavan Aravamudhan Date: Fri, 27 Aug 2021 18:13:24 +0530 Subject: 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. --- recipes/hackmd/index.js | 3 +-- recipes/hackmd/package.json | 2 +- recipes/hackmd/webview.js | 15 ++++++++------- 3 files changed, 10 insertions(+), 10 deletions(-) (limited to 'recipes/hackmd') 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 @@ -// just pass through Franz // todo allow custom url -module.exports = Franz => class HackMd extends Franz { +module.exports = Ferdi => class HackMd extends Ferdi { }; 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 @@ { "id": "hackmd", "name": "HackMd", - "version": "1.0.2", + "version": "1.1.0", "license": "MIT", "config": { "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 @@ -const path = require('path'); +const _path = _interopRequireDefault(require('path')); -module.exports = (Franz) => { +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +module.exports = (Ferdi) => { const getMessages = function getMessages() { // get unread messages const count = document.querySelectorAll('.guilds-wrapper .badge').length; - // set Franz badge - Franz.setBadge(count); + // set Ferdi badge + Ferdi.setBadge(count); }; - // check for new messages every second and update Franz badge - Franz.loop(getMessages); + Ferdi.loop(getMessages); // Hide download message - Franz.injectCSS(path.join(__dirname, 'service.css')); + Ferdi.injectCSS(_path.default.join(__dirname, 'service.css')); }; -- cgit v1.2.3-54-g00ecf