diff options
author | Vijay Raghavan Aravamudhan <vraravam@users.noreply.github.com> | 2021-08-27 18:13:24 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-27 18:13:24 +0530 |
commit | 155c4b832281348c16be1f4ef667e6e23dbf1bd8 (patch) | |
tree | d144e2de2e6c7fb2e334246e8a4aecdbeb08ef8d /recipes/lastpass/webview.js | |
parent | docs: fixed template file for creating recipe. (diff) | |
download | ferdium-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.js | 23 |
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 @@ | |||
1 | const { | 1 | const _path = _interopRequireDefault(require('path')); |
2 | remote, | ||
3 | } = require('electron'); | ||
4 | 2 | ||
5 | const path = require('path'); | 3 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } |
4 | |||
5 | const { remote } = require('electron'); | ||
6 | 6 | ||
7 | const webContents = remote.getCurrentWebContents(); | 7 | const webContents = remote.getCurrentWebContents(); |
8 | const { | 8 | |
9 | session, | 9 | const { session } = webContents; |
10 | } = webContents; | 10 | |
11 | setTimeout(() => { | 11 | setTimeout(() => { |
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 | ||
32 | module.exports = Franz => { | 32 | module.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 | }; |