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/lastpass/webview.js | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) (limited to 'recipes/lastpass/webview.js') diff --git a/recipes/lastpass/webview.js b/recipes/lastpass/webview.js index bed9a32..d4090b3 100644 --- a/recipes/lastpass/webview.js +++ b/recipes/lastpass/webview.js @@ -1,13 +1,13 @@ -const { - remote, -} = require('electron'); +const _path = _interopRequireDefault(require('path')); -const path = require('path'); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +const { remote } = require('electron'); const webContents = remote.getCurrentWebContents(); -const { - session, -} = webContents; + +const { session } = webContents; + setTimeout(() => { if (document.querySelector('body').innerHTML.includes('Google Chrome 36+')) { window.location.reload(); @@ -29,7 +29,7 @@ window.addEventListener('beforeunload', async () => { } }); -module.exports = Franz => { +module.exports = Ferdi => { const getMessages = function getMessages() { const elements = document.querySelectorAll('.CxUIE, .unread'); let count = 0; @@ -40,9 +40,10 @@ module.exports = Franz => { } } - Franz.setBadge(count); + Ferdi.setBadge(count); }; - Franz.injectCSS(path.join(__dirname, 'service.css')); - Franz.loop(getMessages); + Ferdi.loop(getMessages); + + Ferdi.injectCSS(_path.default.join(__dirname, 'service.css')); }; -- cgit v1.2.3-70-g09d2