From e05d27ea49929e763906e6c430ec79c1a093dde7 Mon Sep 17 00:00:00 2001 From: Vijay A Date: Wed, 26 May 2021 18:10:17 +0530 Subject: Replace 'remote' with 'electron/remote' Bumped up major version for affected recipes to denote breaking changes --- recipes/android-messages/package.json | 2 +- recipes/android-messages/webview.js | 8 ++++---- recipes/googlemeet/package.json | 2 +- recipes/googlemeet/webview.js | 6 +++--- recipes/lastpass/package.json | 4 ++-- recipes/lastpass/webview.js | 8 ++++---- recipes/whatsapp/package.json | 2 +- recipes/whatsapp/webview.js | 12 ++++++------ 8 files changed, 22 insertions(+), 22 deletions(-) (limited to 'recipes') diff --git a/recipes/android-messages/package.json b/recipes/android-messages/package.json index 9ff5d0a..752357f 100644 --- a/recipes/android-messages/package.json +++ b/recipes/android-messages/package.json @@ -1,7 +1,7 @@ { "id": "android-messages", "name": "Android Messages", - "version": "1.3.0", + "version": "2.0.0", "description": "Android Messages", "main": "index.js", "author": "Daniel Weinberger, Stefan Malzner ", diff --git a/recipes/android-messages/webview.js b/recipes/android-messages/webview.js index 7c8e004..21323a5 100644 --- a/recipes/android-messages/webview.js +++ b/recipes/android-messages/webview.js @@ -1,10 +1,10 @@ "use strict"; const { - remote -} = require('electron'); + getCurrentWebContents +} = require('@electron/remote'); -const webContents = remote.getCurrentWebContents(); +const webContents = getCurrentWebContents(); const { session } = webContents; @@ -44,4 +44,4 @@ module.exports = (Franz, settings) => { } Franz.loop(getMessages); -}; \ No newline at end of file +}; diff --git a/recipes/googlemeet/package.json b/recipes/googlemeet/package.json index 37fbc0b..00fe1fd 100644 --- a/recipes/googlemeet/package.json +++ b/recipes/googlemeet/package.json @@ -1,7 +1,7 @@ { "id": "googlemeet", "name": "Google Meet", - "version": "1.0.5", + "version": "2.0.0", "description": "Google Meet", "main": "index.js", "author": "Patrick Thoelken ", diff --git a/recipes/googlemeet/webview.js b/recipes/googlemeet/webview.js index 8e91418..332dc1c 100644 --- a/recipes/googlemeet/webview.js +++ b/recipes/googlemeet/webview.js @@ -1,12 +1,12 @@ "use strict"; const { - remote -} = require('electron'); + getCurrentWebContents +} = require('@electron/remote'); const path = require('path'); -const webContents = remote.getCurrentWebContents(); +const webContents = getCurrentWebContents(); const { session } = webContents; diff --git a/recipes/lastpass/package.json b/recipes/lastpass/package.json index a551edf..38e5cfd 100644 --- a/recipes/lastpass/package.json +++ b/recipes/lastpass/package.json @@ -1,7 +1,7 @@ { "id": "lastpass", "name": "LastPass", - "version": "1.0.0", + "version": "2.0.0", "description": "LastPass integration", "main": "index.js", "author": "Janis Hau , Jonathan Winter ", @@ -11,4 +11,4 @@ "hasNotificationSound": true, "message": "LastPass" } -} \ No newline at end of file +} diff --git a/recipes/lastpass/webview.js b/recipes/lastpass/webview.js index 4fdd007..2e67364 100644 --- a/recipes/lastpass/webview.js +++ b/recipes/lastpass/webview.js @@ -1,12 +1,12 @@ "use strict"; const { - remote -} = require('electron'); + getCurrentWebContents +} = require('@electron/remote'); const path = require('path'); -const webContents = remote.getCurrentWebContents(); +const webContents = getCurrentWebContents(); const { session } = webContents; @@ -47,4 +47,4 @@ module.exports = Franz => { Franz.injectCSS(path.join(__dirname, 'service.css')); Franz.loop(getMessages); -}; \ No newline at end of file +}; diff --git a/recipes/whatsapp/package.json b/recipes/whatsapp/package.json index 794623e..e9c4bf4 100644 --- a/recipes/whatsapp/package.json +++ b/recipes/whatsapp/package.json @@ -1,7 +1,7 @@ { "id": "whatsapp", "name": "WhatsApp", - "version": "2.0.9", + "version": "3.0.0", "description": "WhatsApp", "main": "index.js", "author": "Stefan Malzner ", diff --git a/recipes/whatsapp/webview.js b/recipes/whatsapp/webview.js index 169b54c..5dd3729 100644 --- a/recipes/whatsapp/webview.js +++ b/recipes/whatsapp/webview.js @@ -1,12 +1,12 @@ "use strict"; const { - remote -} = require('electron'); + getCurrentWebContents +} = require('@electron/remote'); const path = require('path'); -const webContents = remote.getCurrentWebContents(); +const webContents = getCurrentWebContents(); const { session } = webContents; @@ -36,16 +36,16 @@ module.exports = Franz => { for (var i = 0; i < chatElems.length; i++) { var chatElem = chatElems[i]; var unreadElem = chatElem.children[0].children[0].children[1].children[1].children[1]; - + var countValue = parseInt(unreadElem.textContent) || 0; // Returns 0 in case of isNaN - + if (unreadElem.querySelectorAll("[data-icon=muted]").length === 0) { count += countValue; } else { indirectCount += countValue; } } - + Franz.setBadge(count, indirectCount); }; -- cgit v1.2.3-54-g00ecf