From 18801ed0c02627e87639dc0848cab44dacc18be2 Mon Sep 17 00:00:00 2001 From: Vijay A Date: Mon, 18 Apr 2022 06:51:50 -0500 Subject: Rebranded from 'ferdi' to 'ferdium' (companion changes for the main repo PR #2) --- recipes/whatsapp/webview.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'recipes/whatsapp/webview.js') diff --git a/recipes/whatsapp/webview.js b/recipes/whatsapp/webview.js index b753ad9..3586e14 100644 --- a/recipes/whatsapp/webview.js +++ b/recipes/whatsapp/webview.js @@ -4,7 +4,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -module.exports = Ferdi => { +module.exports = Ferdium => { const getMessages = () => { let count = 0; let indirectCount = 0; @@ -18,7 +18,7 @@ module.exports = Ferdi => { const unreadSpans = parentChatElem.querySelectorAll('span[aria-label]'); for (const unreadElem of unreadSpans) { - const countValue = Ferdi.safeParseInt(unreadElem.textContent); + const countValue = Ferdium.safeParseInt(unreadElem.textContent); if (countValue > 0) { if ( !unreadElem.parentNode.previousSibling || @@ -33,13 +33,13 @@ module.exports = Ferdi => { } } - Ferdi.setBadge(count, indirectCount); + Ferdium.setBadge(count, indirectCount); }; const getActiveDialogTitle = () => { const element = document.querySelector('header .emoji-texttt'); - Ferdi.setDialogTitle(element ? element.textContent : ''); + Ferdium.setDialogTitle(element ? element.textContent : ''); }; const loopFunc = () => { @@ -48,10 +48,10 @@ module.exports = Ferdi => { }; window.addEventListener('beforeunload', async () => { - Ferdi.releaseServiceWorkers(); + Ferdium.releaseServiceWorkers(); }); - Ferdi.loop(loopFunc); + Ferdium.loop(loopFunc); - Ferdi.injectCSS(_path.default.join(__dirname, 'service.css')); + Ferdium.injectCSS(_path.default.join(__dirname, 'service.css')); }; -- cgit v1.2.3-70-g09d2