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/index.js | 3 +-- recipes/evernote/package.json | 2 +- recipes/evernote/webview.js | 17 +++++++---------- 3 files changed, 9 insertions(+), 13 deletions(-) (limited to 'recipes/evernote') diff --git a/recipes/evernote/index.js b/recipes/evernote/index.js index 46f936f..23607bd 100644 --- a/recipes/evernote/index.js +++ b/recipes/evernote/index.js @@ -1,2 +1 @@ -// just pass through Franz -module.exports = Franz => Franz; +module.exports = Ferdi => Ferdi; diff --git a/recipes/evernote/package.json b/recipes/evernote/package.json index fbc610a..6ade667 100644 --- a/recipes/evernote/package.json +++ b/recipes/evernote/package.json @@ -1,7 +1,7 @@ { "id": "evernote", "name": "Evernote", - "version": "1.0.2", + "version": "1.1.0", "license": "MIT", "config": { "serviceURL": "https://www.evernote.com/Login.action" 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-70-g09d2