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/evernote/webview.js | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) (limited to 'recipes/evernote/webview.js') diff --git a/recipes/evernote/webview.js b/recipes/evernote/webview.js index 60742ca..b877798 100644 --- a/recipes/evernote/webview.js +++ b/recipes/evernote/webview.js @@ -1,18 +1,15 @@ -const path = require('path'); +const _path = _interopRequireDefault(require('path')); -module.exports = (Franz, options) => { +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +module.exports = (Ferdi) => { const getMessages = () => { const inbox = document.querySelector('.topbar-notificationsButton.has-newNotifications'); const passiveCount = inbox === null ? 0 : 1; - // set Franz badge - // updates => active unread count - // inbox => passive unread count - Franz.setBadge(0, passiveCount); + Ferdi.setBadge(0, passiveCount); }; - // inject franz.css stylesheet - Franz.injectCSS(path.join(__dirname, 'css', 'franz.css')); + Ferdi.loop(getMessages); - // check for new messages every second and update Franz badge - Franz.loop(getMessages); + Ferdi.injectCSS(_path.default.join(__dirname, 'css', 'franz.css')); }; -- cgit v1.2.3-54-g00ecf