diff options
author | 2020-09-22 20:56:48 +0200 | |
---|---|---|
committer | 2020-09-22 19:56:48 +0100 | |
commit | 6f5e4a00588aefdda7a5a1cfe70935870e7e234a (patch) | |
tree | 9e29aa7aa0620a1a4a968ff8739b4b8ba96791a9 /uncompressed/googlemeet/webview.js | |
parent | Updated logos for Outlook/OWA (diff) | |
download | ferdium-recipes-6f5e4a00588aefdda7a5a1cfe70935870e7e234a.tar.gz ferdium-recipes-6f5e4a00588aefdda7a5a1cfe70935870e7e234a.tar.zst ferdium-recipes-6f5e4a00588aefdda7a5a1cfe70935870e7e234a.zip |
Unpack recipes and update recipes icons (#292)
Co-authored-by: Amine Mouafik <amine@mouafik.fr>
Diffstat (limited to 'uncompressed/googlemeet/webview.js')
-rw-r--r-- | uncompressed/googlemeet/webview.js | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/uncompressed/googlemeet/webview.js b/uncompressed/googlemeet/webview.js deleted file mode 100644 index 8e91418..0000000 --- a/uncompressed/googlemeet/webview.js +++ /dev/null | |||
@@ -1,43 +0,0 @@ | |||
1 | "use strict"; | ||
2 | |||
3 | const { | ||
4 | remote | ||
5 | } = require('electron'); | ||
6 | |||
7 | const path = require('path'); | ||
8 | |||
9 | const webContents = remote.getCurrentWebContents(); | ||
10 | const { | ||
11 | session | ||
12 | } = webContents; | ||
13 | |||
14 | window.onload = () => { | ||
15 | const title = document.querySelector('.window-title').innerHTML; | ||
16 | |||
17 | if (title && title.includes('Google Chrome 36+')) { | ||
18 | window.location.reload(); | ||
19 | } | ||
20 | }; | ||
21 | |||
22 | module.exports = Franz => { | ||
23 | session.flushStorageData(); | ||
24 | session.clearStorageData({ | ||
25 | storages: ['serviceworkers'] | ||
26 | }); | ||
27 | |||
28 | const getMessages = function getMessages() { | ||
29 | const elements = document.querySelectorAll('.CxUIE, .unread'); | ||
30 | let count = 0; | ||
31 | |||
32 | for (let i = 0; i < elements.length; i += 1) { | ||
33 | if (elements[i].querySelectorAll('*[data-icon="muted"]').length === 0) { | ||
34 | count += 1; | ||
35 | } | ||
36 | } | ||
37 | |||
38 | Franz.setBadge(count); | ||
39 | }; | ||
40 | |||
41 | Franz.injectCSS(path.join(__dirname, 'service.css')); | ||
42 | Franz.loop(getMessages); | ||
43 | }; | ||