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/index.js | 6 +++--- recipes/whatsapp/package.json | 2 +- recipes/whatsapp/webview.js | 14 +++++++------- 3 files changed, 11 insertions(+), 11 deletions(-) (limited to 'recipes/whatsapp') diff --git a/recipes/whatsapp/index.js b/recipes/whatsapp/index.js index 4caf116..80eaf51 100644 --- a/recipes/whatsapp/index.js +++ b/recipes/whatsapp/index.js @@ -1,13 +1,13 @@ -module.exports = (Ferdi) => class Messenger extends Ferdi { +module.exports = (Ferdium) => class Messenger extends Ferdium { overrideUserAgent() { - return window.navigator.userAgent.replace(/(Ferdi|Electron)\/\S+ \([^)]+\)/g, '').trim(); + return window.navigator.userAgent.replace(/(Ferdium|Electron)\/\S+ \([^)]+\)/g, '').trim(); } modifyRequestHeaders() { return [ { headers: { - 'user-agent': window.navigator.userAgent.replace(/(Ferdi|Electron)\/\S+ \([^)]+\)/g, '').trim(), + 'user-agent': window.navigator.userAgent.replace(/(Ferdium|Electron)\/\S+ \([^)]+\)/g, '').trim(), }, requestFilters: { urls: ['*://*/*'], diff --git a/recipes/whatsapp/package.json b/recipes/whatsapp/package.json index d93eb3e..5d0f001 100644 --- a/recipes/whatsapp/package.json +++ b/recipes/whatsapp/package.json @@ -1,7 +1,7 @@ { "id": "whatsapp", "name": "WhatsApp", - "version": "3.3.7", + "version": "3.4.0", "license": "MIT", "config": { "serviceURL": "https://web.whatsapp.com", 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-54-g00ecf