diff options
Diffstat (limited to 'recipes/lastpass')
-rw-r--r-- | recipes/lastpass/index.js | 4 | ||||
-rw-r--r-- | recipes/lastpass/package.json | 2 | ||||
-rw-r--r-- | recipes/lastpass/webview.js | 23 |
3 files changed, 15 insertions, 14 deletions
diff --git a/recipes/lastpass/index.js b/recipes/lastpass/index.js index 16c9047..e0daab9 100644 --- a/recipes/lastpass/index.js +++ b/recipes/lastpass/index.js | |||
@@ -1,5 +1,5 @@ | |||
1 | module.exports = Franz => class Messenger extends Franz { | 1 | module.exports = Ferdi => class Messenger extends Ferdi { |
2 | overrideUserAgent() { | 2 | overrideUserAgent() { |
3 | return window.navigator.userAgent.replace(/(Franz|Electron)([^\s]+\s)/g, ''); | 3 | return window.navigator.userAgent.replace(/(Ferdi|Electron)\/\S+ \([^)]+\)/g, '').trim(); |
4 | } | 4 | } |
5 | }; | 5 | }; |
diff --git a/recipes/lastpass/package.json b/recipes/lastpass/package.json index b54e92a..d45cb4b 100644 --- a/recipes/lastpass/package.json +++ b/recipes/lastpass/package.json | |||
@@ -1,7 +1,7 @@ | |||
1 | { | 1 | { |
2 | "id": "lastpass", | 2 | "id": "lastpass", |
3 | "name": "LastPass", | 3 | "name": "LastPass", |
4 | "version": "2.0.2", | 4 | "version": "2.1.0", |
5 | "license": "MIT", | 5 | "license": "MIT", |
6 | "config": { | 6 | "config": { |
7 | "serviceURL": "https://lastpass.com/?ac=1&lpnorefresh=1", | 7 | "serviceURL": "https://lastpass.com/?ac=1&lpnorefresh=1", |
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 | }; |