diff options
Diffstat (limited to 'recipes/lastpass/webview.js')
-rw-r--r-- | recipes/lastpass/webview.js | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/recipes/lastpass/webview.js b/recipes/lastpass/webview.js index d4090b3..878fa5e 100644 --- a/recipes/lastpass/webview.js +++ b/recipes/lastpass/webview.js | |||
@@ -2,12 +2,6 @@ const _path = _interopRequireDefault(require('path')); | |||
2 | 2 | ||
3 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | 3 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } |
4 | 4 | ||
5 | const { remote } = require('electron'); | ||
6 | |||
7 | const webContents = remote.getCurrentWebContents(); | ||
8 | |||
9 | const { session } = webContents; | ||
10 | |||
11 | setTimeout(() => { | 5 | setTimeout(() => { |
12 | if (document.querySelector('body').innerHTML.includes('Google Chrome 36+')) { | 6 | if (document.querySelector('body').innerHTML.includes('Google Chrome 36+')) { |
13 | window.location.reload(); | 7 | window.location.reload(); |
@@ -15,6 +9,7 @@ setTimeout(() => { | |||
15 | }, 1000); | 9 | }, 1000); |
16 | window.addEventListener('beforeunload', async () => { | 10 | window.addEventListener('beforeunload', async () => { |
17 | try { | 11 | try { |
12 | const { session } = Ferdi.getCurrentWebContents(); | ||
18 | session.flushStorageData(); | 13 | session.flushStorageData(); |
19 | session.clearStorageData({ | 14 | session.clearStorageData({ |
20 | storages: ['appcache', 'serviceworkers', 'cachestorage', 'websql', 'indexdb'], | 15 | storages: ['appcache', 'serviceworkers', 'cachestorage', 'websql', 'indexdb'], |