aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/lastpass/webview.js
diff options
context:
space:
mode:
authorLibravatar Vijay Raghavan Aravamudhan <vraravam@users.noreply.github.com>2021-08-27 18:13:24 +0530
committerLibravatar GitHub <noreply@github.com>2021-08-27 18:13:24 +0530
commit155c4b832281348c16be1f4ef667e6e23dbf1bd8 (patch)
treed144e2de2e6c7fb2e334246e8a4aecdbeb08ef8d /recipes/lastpass/webview.js
parentdocs: fixed template file for creating recipe. (diff)
downloadferdium-recipes-155c4b832281348c16be1f4ef667e6e23dbf1bd8.tar.gz
ferdium-recipes-155c4b832281348c16be1f4ef667e6e23dbf1bd8.tar.zst
ferdium-recipes-155c4b832281348c16be1f4ef667e6e23dbf1bd8.zip
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.
Diffstat (limited to 'recipes/lastpass/webview.js')
-rw-r--r--recipes/lastpass/webview.js23
1 files changed, 12 insertions, 11 deletions
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 @@
1const { 1const _path = _interopRequireDefault(require('path'));
2 remote,
3} = require('electron');
4 2
5const path = require('path'); 3function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
4
5const { remote } = require('electron');
6 6
7const webContents = remote.getCurrentWebContents(); 7const webContents = remote.getCurrentWebContents();
8const { 8
9 session, 9const { session } = webContents;
10} = webContents; 10
11setTimeout(() => { 11setTimeout(() => {
12 if (document.querySelector('body').innerHTML.includes('Google Chrome 36+')) { 12 if (document.querySelector('body').innerHTML.includes('Google Chrome 36+')) {
13 window.location.reload(); 13 window.location.reload();
@@ -29,7 +29,7 @@ window.addEventListener('beforeunload', async () => {
29 } 29 }
30}); 30});
31 31
32module.exports = Franz => { 32module.exports = Ferdi => {
33 const getMessages = function getMessages() { 33 const getMessages = function getMessages() {
34 const elements = document.querySelectorAll('.CxUIE, .unread'); 34 const elements = document.querySelectorAll('.CxUIE, .unread');
35 let count = 0; 35 let count = 0;
@@ -40,9 +40,10 @@ module.exports = Franz => {
40 } 40 }
41 } 41 }
42 42
43 Franz.setBadge(count); 43 Ferdi.setBadge(count);
44 }; 44 };
45 45
46 Franz.injectCSS(path.join(__dirname, 'service.css')); 46 Ferdi.loop(getMessages);
47 Franz.loop(getMessages); 47
48 Ferdi.injectCSS(_path.default.join(__dirname, 'service.css'));
48}; 49};