aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/lastpass
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
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')
-rw-r--r--recipes/lastpass/index.js4
-rw-r--r--recipes/lastpass/package.json2
-rw-r--r--recipes/lastpass/webview.js23
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 @@
1module.exports = Franz => class Messenger extends Franz { 1module.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 @@
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};