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/skype/webview.js | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'recipes/skype/webview.js') diff --git a/recipes/skype/webview.js b/recipes/skype/webview.js index c20726c..9af7c2b 100644 --- a/recipes/skype/webview.js +++ b/recipes/skype/webview.js @@ -1,7 +1,10 @@ +const _path = _interopRequireDefault(require('path')); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + const { remote: { BrowserWindow } } = require('electron'); -const path = require('path'); -module.exports = (Franz, settings) => { +module.exports = (Ferdi, settings) => { const getMessages = function getMessages() { let count = 0; const container = document.querySelector('[role="tablist"] > [title="Chats"] > div'); @@ -19,12 +22,14 @@ module.exports = (Franz, settings) => { } } - Franz.setBadge(count); + Ferdi.setBadge(count); }; - Franz.injectCSS(path.join(__dirname, 'service.css')); - Franz.injectJSUnsafe(path.join(__dirname, 'webview-unsafe.js')); - Franz.loop(getMessages); + Ferdi.loop(getMessages); + + Ferdi.injectCSS(_path.default.join(__dirname, 'service.css')); + Ferdi.injectJSUnsafe(_path.default.join(__dirname, 'webview-unsafe.js')); + document.addEventListener('click', event => { const link = event.target.closest('a[href^="http"]'); const button = event.target.closest('button[title^="http"]'); -- cgit v1.2.3-70-g09d2