diff options
author | MCMXC <16797721+mcmxcdev@users.noreply.github.com> | 2023-07-26 06:29:03 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-26 17:59:03 +0530 |
commit | 9b8f01716774a960073e944823ab727cc867a8f6 (patch) | |
tree | 732b83770baa78f5cf12776aaa33ce65bebfa418 /recipes/google-meet | |
parent | Add Excalidraw recipe (#393) (diff) | |
download | ferdium-recipes-9b8f01716774a960073e944823ab727cc867a8f6.tar.gz ferdium-recipes-9b8f01716774a960073e944823ab727cc867a8f6.tar.zst ferdium-recipes-9b8f01716774a960073e944823ab727cc867a8f6.zip |
chore: improve lint setup (#397)
- update eslint config to closely mirror the ones from ferdium-app
- add .eslintignore
- opt in to eslint `reportUnusedDisableDirectives` config option
- remove `trailingComma: all` from `prettier` config which is default in `prettier` v3
- autofix or disable a lot of lint issues throughout codebase
- add `volta` configuration to `package.json` to autoload correct `node` and `pnpm` versions
- upgrade all `eslint` and `prettier` related dependencies to latest
- update lint:fix npm script
- reformat touched files with prettier
- bumped up minor version for all recipes that have changes
- introduced injection of 'service.css' where it was missing in many recipes
---------
Co-authored-by: Vijay A <vraravam@users.noreply.github.com>
Diffstat (limited to 'recipes/google-meet')
-rw-r--r-- | recipes/google-meet/icon.svg | 1 | ||||
-rw-r--r-- | recipes/google-meet/index.js | 1 | ||||
-rw-r--r-- | recipes/google-meet/package.json | 10 | ||||
-rw-r--r-- | recipes/google-meet/service.css | 5 | ||||
-rw-r--r-- | recipes/google-meet/webview.js | 36 |
5 files changed, 53 insertions, 0 deletions
diff --git a/recipes/google-meet/icon.svg b/recipes/google-meet/icon.svg new file mode 100644 index 0000000..4b5a0d3 --- /dev/null +++ b/recipes/google-meet/icon.svg | |||
@@ -0,0 +1 @@ | |||
<svg height="297" preserveAspectRatio="xMidYMid" viewBox="0 0 256 297" width="297" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><defs><filter id="b" height="100.7%" width="100.8%" x="-.4%" y="-.3%"><feOffset dy="2" in="SourceAlpha" result="shadowOffsetInner1"/><feComposite in="shadowOffsetInner1" in2="SourceAlpha" k2="-1" k3="1" operator="arithmetic" result="shadowInnerInner1"/><feColorMatrix in="shadowInnerInner1" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.2 0"/></filter><filter id="c" height="100.7%" width="100.8%" x="-.4%" y="-.3%"><feOffset dy="-2" in="SourceAlpha" result="shadowOffsetInner1"/><feComposite in="shadowOffsetInner1" in2="SourceAlpha" k2="-1" k3="1" operator="arithmetic" result="shadowInnerInner1"/><feColorMatrix in="shadowInnerInner1" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.1 0"/></filter><filter id="f" height="111.8%" width="102.6%" x="-1%" y="-3%"><feOffset dx="1" dy="3" in="SourceAlpha" result="shadowOffsetOuter1"/><feColorMatrix in="shadowOffsetOuter1" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.1 0"/></filter><linearGradient id="a" x1="26.07%" x2="74.949%" y1="68.042%" y2="19.279%"><stop offset="0" stop-color="#058b7e"/><stop offset="0" stop-color="#058d80"/><stop offset="1" stop-color="#058d7f"/></linearGradient><linearGradient id="d" x1="30.048%" x2="81.94%" y1="27.302%" y2="84.64%"><stop offset="0"/><stop offset="1" stop-color="#d8d8d8" stop-opacity="0"/></linearGradient><path id="g" d="M55.58 128.105v34.239c0 9.039 7.396 16.435 16.435 16.435h85.016c9.039 0 16.434-7.396 16.434-16.435v-21.623l33.66 33.66v-46.276z"/><mask id="e" fill="#fff"><path d="M127.683 0C57.166 0 0 55.79 0 124.612s57.166 124.613 127.683 124.613l.271 46.913c65.606-37.27 128-87.019 128-171.526C255.954 55.791 198.2 0 127.683 0z"/></mask></defs><path d="M127.683 0C57.166 0 0 55.79 0 124.612s57.166 124.613 127.683 124.613l.271 46.913c65.606-37.27 128-87.019 128-171.526C255.954 55.791 198.2 0 127.683 0z" fill="url(#a)"/><path d="M127.683 0C57.166 0 0 55.79 0 124.612s57.166 124.613 127.683 124.613l.271 46.913c65.606-37.27 128-87.019 128-171.526C255.954 55.791 198.2 0 127.683 0z" filter="url(#b)"/><path d="M127.683 0C57.166 0 0 55.79 0 124.612s57.166 124.613 127.683 124.613l.271 46.913c65.606-37.27 128-87.019 128-171.526C255.954 55.791 198.2 0 127.683 0z" filter="url(#c)"/><path d="m58.318 168.56 109.037 112.724 144.54-105.666-104.454-93.92-22.334 38.273z" fill="url(#d)" fill-opacity=".21" mask="url(#e)"/><use filter="url(#f)" xlink:href="#g"/><use fill="#f6f6f6" fill-rule="evenodd" xlink:href="#g"/><path d="M207.125 128.105V81.7l-33.66 33.587v-21.42c0-9.039-7.395-16.434-16.434-16.434H72.015c-9.04 0-16.435 7.395-16.435 16.435v34.238z" fill="#e2e2e2"/></svg> \ No newline at end of file | |||
diff --git a/recipes/google-meet/index.js b/recipes/google-meet/index.js new file mode 100644 index 0000000..dd41f72 --- /dev/null +++ b/recipes/google-meet/index.js | |||
@@ -0,0 +1 @@ | |||
module.exports = Ferdium => Ferdium; | |||
diff --git a/recipes/google-meet/package.json b/recipes/google-meet/package.json new file mode 100644 index 0000000..93f2f33 --- /dev/null +++ b/recipes/google-meet/package.json | |||
@@ -0,0 +1,10 @@ | |||
1 | { | ||
2 | "id": "google-meet", | ||
3 | "name": "Google Meet", | ||
4 | "version": "2.4.0", | ||
5 | "license": "MIT", | ||
6 | "config": { | ||
7 | "serviceURL": "https://meet.google.com/u/0/", | ||
8 | "hasNotificationSound": true | ||
9 | } | ||
10 | } | ||
diff --git a/recipes/google-meet/service.css b/recipes/google-meet/service.css new file mode 100644 index 0000000..b453fd4 --- /dev/null +++ b/recipes/google-meet/service.css | |||
@@ -0,0 +1,5 @@ | |||
1 | .app-wrapper-web .app { | ||
2 | width: 100% !important; | ||
3 | height: 100% !important; | ||
4 | top: 0 !important; | ||
5 | } | ||
diff --git a/recipes/google-meet/webview.js b/recipes/google-meet/webview.js new file mode 100644 index 0000000..e4694ef --- /dev/null +++ b/recipes/google-meet/webview.js | |||
@@ -0,0 +1,36 @@ | |||
1 | function _interopRequireDefault(obj) { | ||
2 | return obj && obj.__esModule ? obj : { default: obj }; | ||
3 | } | ||
4 | |||
5 | const _path = _interopRequireDefault(require('path')); | ||
6 | |||
7 | window.addEventListener('load', () => { | ||
8 | const title = document.querySelector('.window-title').textContent; | ||
9 | |||
10 | if (title && title.includes('Google Chrome 36+')) { | ||
11 | window.location.reload(); | ||
12 | } | ||
13 | }); | ||
14 | |||
15 | module.exports = (Ferdium, settings) => { | ||
16 | const getMessages = () => { | ||
17 | const elements = document.querySelectorAll('.CxUIE, .unread'); | ||
18 | let count = 0; | ||
19 | |||
20 | for (const element of elements) { | ||
21 | if (element.querySelectorAll('*[data-icon="muted"]').length === 0) { | ||
22 | count += 1; | ||
23 | } | ||
24 | } | ||
25 | |||
26 | Ferdium.setBadge(count); | ||
27 | }; | ||
28 | |||
29 | Ferdium.loop(getMessages); | ||
30 | |||
31 | window.addEventListener('beforeunload', async () => { | ||
32 | Ferdium.clearStorageData(settings.id, { storages: ['serviceworkers'] }); | ||
33 | }); | ||
34 | |||
35 | Ferdium.injectCSS(_path.default.join(__dirname, 'service.css')); | ||
36 | }; | ||