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/fastmail/webview.js | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'recipes/fastmail/webview.js') diff --git a/recipes/fastmail/webview.js b/recipes/fastmail/webview.js index 5355dbe..46bad0d 100644 --- a/recipes/fastmail/webview.js +++ b/recipes/fastmail/webview.js @@ -1,15 +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 = () => { const inbox = document.querySelector('.v-MailboxSource--inbox .v-MailboxSource-badge'); if (!inbox) { return; } const messages = Number(inbox.innerText); - Franz.setBadge(messages); + Ferdi.setBadge(messages); }; - Franz.injectJSUnsafe(path.join(__dirname, 'webview-unsafe.js')); - Franz.loop(getMessages); + Ferdi.loop(getMessages); + + Ferdi.injectJSUnsafe(_path.default.join(__dirname, 'webview-unsafe.js')); }; -- cgit v1.2.3-70-g09d2