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/googlecalendar | |
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/googlecalendar')
-rw-r--r-- | recipes/googlecalendar/LICENSE | 19 | ||||
-rw-r--r-- | recipes/googlecalendar/calendar.css | 41 | ||||
-rw-r--r-- | recipes/googlecalendar/darkmode.css | 222 | ||||
-rw-r--r-- | recipes/googlecalendar/icon.svg | 1 | ||||
-rw-r--r-- | recipes/googlecalendar/index.js | 1 | ||||
-rw-r--r-- | recipes/googlecalendar/package.json | 15 | ||||
-rw-r--r-- | recipes/googlecalendar/webview-unsafe.js | 46 | ||||
-rw-r--r-- | recipes/googlecalendar/webview.js | 16 |
8 files changed, 0 insertions, 361 deletions
diff --git a/recipes/googlecalendar/LICENSE b/recipes/googlecalendar/LICENSE deleted file mode 100644 index 4608c00..0000000 --- a/recipes/googlecalendar/LICENSE +++ /dev/null | |||
@@ -1,19 +0,0 @@ | |||
1 | Copyright 2017 Rico Herwig | ||
2 | |||
3 | Permission is hereby granted, free of charge, to any person obtaining | ||
4 | a copy of this software and associated documentation files (the "Software"), | ||
5 | to deal in the Software without restriction, including without limitation the | ||
6 | rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
7 | copies of the Software, and to permit persons to whom the Software is furnished | ||
8 | to do so, subject to the following conditions: | ||
9 | |||
10 | The above copyright notice and this permission notice shall be included | ||
11 | in all copies or substantial portions of the Software. | ||
12 | |||
13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
14 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. | ||
16 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, | ||
17 | DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, | ||
18 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE | ||
19 | OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
diff --git a/recipes/googlecalendar/calendar.css b/recipes/googlecalendar/calendar.css deleted file mode 100644 index 7cd726b..0000000 --- a/recipes/googlecalendar/calendar.css +++ /dev/null | |||
@@ -1,41 +0,0 @@ | |||
1 | #franz-modal { | ||
2 | display: none; | ||
3 | position: fixed; | ||
4 | z-index: 9999; | ||
5 | left: 0; | ||
6 | top: 0; | ||
7 | right: 0; | ||
8 | bottom: 0; | ||
9 | overflow: auto; | ||
10 | background-color: rgba(0, 0, 0, 0.8); | ||
11 | } | ||
12 | |||
13 | #franz-modal.open { | ||
14 | display: block; | ||
15 | } | ||
16 | |||
17 | #franz-modal .modal-content { | ||
18 | background-color: #fefefe; | ||
19 | margin: 15% auto; | ||
20 | padding: 20px; | ||
21 | border: 1px solid #888; | ||
22 | width: 30%; | ||
23 | -webkit-border-radius: 3px; | ||
24 | -moz-border-radius: 3px; | ||
25 | border-radius: 3px; | ||
26 | } | ||
27 | |||
28 | #franz-modal .close { | ||
29 | color: #aaa; | ||
30 | float: right; | ||
31 | margin-top: -10px; | ||
32 | font-size: 20px; | ||
33 | font-weight: bold; | ||
34 | } | ||
35 | |||
36 | #franz-modal .close:hover, | ||
37 | #franz-modal .close:focus { | ||
38 | color: black; | ||
39 | text-decoration: none; | ||
40 | cursor: pointer; | ||
41 | } | ||
diff --git a/recipes/googlecalendar/darkmode.css b/recipes/googlecalendar/darkmode.css deleted file mode 100644 index aab4f78..0000000 --- a/recipes/googlecalendar/darkmode.css +++ /dev/null | |||
@@ -1,222 +0,0 @@ | |||
1 | /* Copied from: https://github.com/ducfilan/Dark-mode-Franz-Ferdi */ | ||
2 | |||
3 | html { | ||
4 | -webkit-filter: invert(90%) hue-rotate(180deg) !important; | ||
5 | filter: invert(90%) hue-rotate(180deg) !important; | ||
6 | background: #191919 !important; | ||
7 | } | ||
8 | |||
9 | .CflnFb { | ||
10 | background-color: #7b96c1 !important; | ||
11 | filter: invert(100%) hue-rotate(180deg) brightness(1.1) saturate(140%) | ||
12 | contrast(105%) !important; | ||
13 | color: #fff !important; | ||
14 | } | ||
15 | |||
16 | .h5t3Nc .GrK4Mb, | ||
17 | .h5t3Nc .hVDHke, | ||
18 | .h5t3Nc .l7VQxb, | ||
19 | .h5t3Nc .zP0T0b, | ||
20 | .h5t3Nc .qNixLe { | ||
21 | background-color: #c9c9c9; | ||
22 | border-color: #fff; | ||
23 | } | ||
24 | |||
25 | .lq96Td { | ||
26 | background-color: #003e3a !important; | ||
27 | color: #fff !important; | ||
28 | filter: invert(100%) hue-rotate(180deg) brightness(1.1) saturate(140%) | ||
29 | contrast(105%) !important; | ||
30 | } | ||
31 | |||
32 | .GooADb { | ||
33 | color: #9dceff !important; | ||
34 | text-shadow: 0 0 #404040 !important; | ||
35 | } | ||
36 | |||
37 | .bJZIjf.qs41qe { | ||
38 | opacity: 0.3; | ||
39 | } | ||
40 | |||
41 | #gb a.gb_ja, | ||
42 | #gb a.gb_ja:visited, | ||
43 | #gb a.gb_ja:active, | ||
44 | #gb a.gb_ka, | ||
45 | #gb a.gb_ka:visited { | ||
46 | color: rgba(255, 255, 255, 0.87) !important; | ||
47 | text-decoration: none !important; | ||
48 | background-color: #000 !important; | ||
49 | } | ||
50 | |||
51 | .M6tHv { | ||
52 | background-color: #444 !important; | ||
53 | } | ||
54 | |||
55 | .gb_ea.gb_6f { | ||
56 | background-color: #e8e8e8 !important; | ||
57 | } | ||
58 | |||
59 | .gb_yc svg, | ||
60 | .gb_kc svg { | ||
61 | color: #000 !important; | ||
62 | opacity: 0.54 !important; | ||
63 | } | ||
64 | |||
65 | .HkPXyb { | ||
66 | background-color: #f9f9f9; | ||
67 | } | ||
68 | |||
69 | .EfQccc.F262Ye.EiZ8Dd::after { | ||
70 | border-color: #000; | ||
71 | } | ||
72 | |||
73 | .uHMk6b.fsHoPb { | ||
74 | border: 7px solid #000 !important; | ||
75 | } | ||
76 | |||
77 | .g3VIld.GFhhge.Up8vH.hFEqNb.J9Nfi.iWO5td { | ||
78 | filter: invert(100%) hue-rotate(180deg) brightness(1.1) saturate(140%) | ||
79 | contrast(105%) !important; | ||
80 | background: #191919 !important; | ||
81 | color: #fff !important; | ||
82 | } | ||
83 | |||
84 | .g3dbUc .jKgTF, | ||
85 | .QGRmIf, | ||
86 | .lcPUt { | ||
87 | filter: invert(100%) hue-rotate(180deg) brightness(1.1) saturate(140%) | ||
88 | contrast(105%) !important; | ||
89 | font-weight: 700 !important; | ||
90 | mix-blend-mode: darken; | ||
91 | } | ||
92 | |||
93 | .g3dbUc.UflSff { | ||
94 | filter: invert(100%) hue-rotate(180deg) saturate(140%) contrast(105%) | ||
95 | opacity(40%) !important; | ||
96 | color: #404040 !important; | ||
97 | } | ||
98 | |||
99 | .NlL62b.EfQccc.elYzab-cXXICe-Hjleke.EiZ8Dd.UflSff.jKgTF { | ||
100 | filter: invert(100%) hue-rotate(180deg) saturate(140%) contrast(50%) | ||
101 | brightness(140%) opacity(90%) !important; | ||
102 | } | ||
103 | |||
104 | .NlL62b.EfQccc.elYzab-cXXICe-Hjleke.EiZ8Dd.UflSff { | ||
105 | filter: opacity(80%) !important; | ||
106 | } | ||
107 | |||
108 | .NlL62b.EfQccc.elYzab-cXXICe-Hjleke.EiZ8Dd.jKgTF { | ||
109 | filter: invert(100%) hue-rotate(180deg) brightness(1.1) saturate(140%) | ||
110 | contrast(105%) !important; | ||
111 | font-weight: 700 !important; | ||
112 | } | ||
113 | |||
114 | .W0m3G { | ||
115 | font-weight: 500 !important; | ||
116 | } | ||
117 | |||
118 | .g3dbUc { | ||
119 | font-weight: 900 !important; | ||
120 | color: #000 !important; | ||
121 | } | ||
122 | |||
123 | .g3dbUc.smECzc { | ||
124 | color: #666 !important; | ||
125 | } | ||
126 | |||
127 | .FAxxKc { | ||
128 | font-weight: 600 !important; | ||
129 | color: #000 !important; | ||
130 | } | ||
131 | |||
132 | .rq8Mwb { | ||
133 | filter: invert(100%) !important; | ||
134 | } | ||
135 | |||
136 | .WpDZC, | ||
137 | .zHQkBf { | ||
138 | color: #c1c1c1 !important; | ||
139 | } | ||
140 | |||
141 | .XHsn7e, | ||
142 | .YqtBEc, | ||
143 | .xuBVOe, | ||
144 | .Mh0NNb, | ||
145 | .ck4bY, | ||
146 | .asor.asor_i0, | ||
147 | .gsoi.gsoi_w, | ||
148 | .gsoi.gsoi_c.asor_v, | ||
149 | .gsoi.gsoi_9.asor_v, | ||
150 | .gsoi.gsoi_7.asor_v, | ||
151 | #vqd3vxfo4jpl, | ||
152 | #pnsketfj08m, | ||
153 | .st-wc, | ||
154 | .NlL62b.EfQccc.elYzab-cXXICe-Hjleke.EiZ8Dd, | ||
155 | .a63c9c.ztKZ3d, | ||
156 | .a63c9c, | ||
157 | .Oxm52e, | ||
158 | .kImhzd, | ||
159 | .hsrazb, | ||
160 | .Tnsqdc, | ||
161 | .kw5sif, | ||
162 | .kXIDId, | ||
163 | .sIyjR, | ||
164 | .ghXZpb, | ||
165 | .whsOnd.zHQkBf { | ||
166 | filter: invert(100%) hue-rotate(180deg) brightness(1.1) saturate(140%) | ||
167 | contrast(105%) !important; | ||
168 | } | ||
169 | |||
170 | .gb_3, | ||
171 | #rAECCd, | ||
172 | .jPtXgd { | ||
173 | font-weight: 600 !important; | ||
174 | } | ||
175 | |||
176 | #I0_1513527137275, | ||
177 | .gb_W, | ||
178 | :not([data-date]):before, | ||
179 | img, | ||
180 | svg, | ||
181 | .jPtXgd, | ||
182 | .gb_Wa.gb_Fe, | ||
183 | .fFW7wc-OEVmcd { | ||
184 | filter: invert(100%) hue-rotate(180deg) brightness(1.1) contrast(105%) !important; | ||
185 | } | ||
186 | |||
187 | .Wbs5sd, | ||
188 | .rF3YF.wmyjXb, | ||
189 | .A6wOnd, | ||
190 | .VgueE, | ||
191 | .Jmftzc.gVNoLb.EiZ8Dd, | ||
192 | .Jmftzc.K9QN7e.EiZ8Dd.UflSff, | ||
193 | .Jmftzc.K9QN7e.EiZ8Dd, | ||
194 | .i5a7ie, | ||
195 | .gb_Eb { | ||
196 | color: #000 !important; | ||
197 | } | ||
198 | |||
199 | .EfQccc.Hrn1mc.EiZ8Dd::after, | ||
200 | .EfQccc.MmaWIb.KKjvXb.EiZ8Dd::after { | ||
201 | border: 1px solid #000; | ||
202 | } | ||
203 | |||
204 | .XBkKC.WSvIUd, | ||
205 | .logo-plus-button-lockup-text { | ||
206 | color: #fff; | ||
207 | } | ||
208 | |||
209 | .IP9Hyd .O0WRkf:first-child, | ||
210 | .gb_je.gb_ee { | ||
211 | color: #fff; | ||
212 | } | ||
213 | |||
214 | .Jmftzc.gVNoLb.LKeQwe, | ||
215 | .Jmftzc.EiZ8Dd { | ||
216 | color: #000; | ||
217 | } | ||
218 | |||
219 | .gb_fa.gb_ng, | ||
220 | .gb_Z { | ||
221 | font-weight: bolder !important; | ||
222 | } | ||
diff --git a/recipes/googlecalendar/icon.svg b/recipes/googlecalendar/icon.svg deleted file mode 100644 index c71fa08..0000000 --- a/recipes/googlecalendar/icon.svg +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | <svg xmlns="http://www.w3.org/2000/svg" viewBox="186 38 76 76"><path fill="#fff" d="M244 56h-40v40h40V56z"/><path fill="#EA4335" d="m244 114 18-18h-18v18z"/><path fill="#FBBC04" d="M262 56h-18v40h18V56z"/><path fill="#34A853" d="M244 96h-40v18h40V96z"/><path fill="#188038" d="M186 96v12c0 3.315 2.685 6 6 6h12V96h-18z"/><path fill="#1967D2" d="M262 56V44c0-3.315-2.685-6-6-6h-12v18h18z"/><path fill="#4285F4" d="M244 38h-52c-3.315 0-6 2.685-6 6v52h18V56h40V38z"/><path fill="#4285F4" d="M212.205 87.03c-1.495-1.01-2.53-2.485-3.095-4.435l3.47-1.43c.315 1.2.865 2.13 1.65 2.79.78.66 1.73.985 2.84.985 1.135 0 2.11-.345 2.925-1.035s1.225-1.57 1.225-2.635c0-1.09-.43-1.98-1.29-2.67-.86-.69-1.94-1.035-3.23-1.035h-2.005V74.13h1.8c1.11 0 2.045-.3 2.805-.9.76-.6 1.14-1.42 1.14-2.465 0-.93-.34-1.67-1.02-2.225-.68-.555-1.54-.835-2.585-.835-1.02 0-1.83.27-2.43.815a4.784 4.784 0 0 0-1.31 2.005l-3.435-1.43c.455-1.29 1.29-2.43 2.515-3.415 1.225-.985 2.79-1.48 4.69-1.48 1.405 0 2.67.27 3.79.815 1.12.545 2 1.3 2.635 2.26.635.965.95 2.045.95 3.245 0 1.225-.295 2.26-.885 3.11-.59.85-1.315 1.5-2.175 1.955v.205a6.605 6.605 0 0 1 2.79 2.175c.725.975 1.09 2.14 1.09 3.5 0 1.36-.345 2.575-1.035 3.64s-1.645 1.905-2.855 2.515c-1.215.61-2.58.92-4.095.92-1.755.005-3.375-.5-4.87-1.51zm21.315-17.22-3.81 2.755-1.905-2.89 6.835-4.93h2.62V88h-3.74V69.81z"/></svg> \ No newline at end of file | ||
diff --git a/recipes/googlecalendar/index.js b/recipes/googlecalendar/index.js deleted file mode 100644 index dd41f72..0000000 --- a/recipes/googlecalendar/index.js +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | module.exports = Ferdium => Ferdium; | ||
diff --git a/recipes/googlecalendar/package.json b/recipes/googlecalendar/package.json deleted file mode 100644 index f6232cb..0000000 --- a/recipes/googlecalendar/package.json +++ /dev/null | |||
@@ -1,15 +0,0 @@ | |||
1 | { | ||
2 | "id": "googlecalendar", | ||
3 | "name": "Google Calendar", | ||
4 | "version": "2.3.2", | ||
5 | "license": "MIT", | ||
6 | "aliases": [ | ||
7 | "google-calendar", | ||
8 | "gCalendar" | ||
9 | ], | ||
10 | "config": { | ||
11 | "serviceURL": "https://calendar.google.com/u/0/", | ||
12 | "hasCustomUrl": true, | ||
13 | "hasNotificationSound": true | ||
14 | } | ||
15 | } | ||
diff --git a/recipes/googlecalendar/webview-unsafe.js b/recipes/googlecalendar/webview-unsafe.js deleted file mode 100644 index 7840600..0000000 --- a/recipes/googlecalendar/webview-unsafe.js +++ /dev/null | |||
@@ -1,46 +0,0 @@ | |||
1 | let modal; | ||
2 | let updates = 0; | ||
3 | |||
4 | const waitFor = (condition, callback) => { | ||
5 | if (!condition()) { | ||
6 | window.setTimeout(waitFor.bind(null, condition, callback), 100); | ||
7 | } else { | ||
8 | callback(); | ||
9 | } | ||
10 | }; | ||
11 | |||
12 | const showModal = text => { | ||
13 | modal.querySelector('p').textContent = text; | ||
14 | updates += 1; | ||
15 | window.ferdium.setBadge(updates); | ||
16 | modal.classList.add('open'); | ||
17 | }; | ||
18 | |||
19 | const hideModal = () => { | ||
20 | modal.querySelector('p').textContent = ''; | ||
21 | updates -= 1; | ||
22 | window.ferdium.setBadge(updates); | ||
23 | modal.classList.remove('open'); | ||
24 | }; | ||
25 | |||
26 | const createModal = () => { | ||
27 | const modalDialog = document.createElement('div'); | ||
28 | modalDialog.setAttribute('id', 'franz-modal'); | ||
29 | modalDialog.textContent = | ||
30 | '<div class="modal-content"><span class="close">×</span><p></p></div>'; | ||
31 | modalDialog.querySelector('.close').addEventListener('click', hideModal); | ||
32 | |||
33 | return modalDialog; | ||
34 | }; | ||
35 | |||
36 | window.alert = showModal; | ||
37 | |||
38 | modal = createModal(); | ||
39 | waitFor( | ||
40 | () => document.body, | ||
41 | () => document.body.append(modal), | ||
42 | ); | ||
43 | document.addEventListener( | ||
44 | 'keydown', | ||
45 | event => event.key === 'Escape' && hideModal(), | ||
46 | ); | ||
diff --git a/recipes/googlecalendar/webview.js b/recipes/googlecalendar/webview.js deleted file mode 100644 index 9937bec..0000000 --- a/recipes/googlecalendar/webview.js +++ /dev/null | |||
@@ -1,16 +0,0 @@ | |||
1 | const _path = _interopRequireDefault(require('path')); | ||
2 | |||
3 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
4 | |||
5 | module.exports = Ferdium => { | ||
6 | // if the user is on googlecalendar landing page, go to the login page. | ||
7 | if ( | ||
8 | location.hostname == 'workspace.google.com' && | ||
9 | location.href.includes('products/calendar/') | ||
10 | ) { | ||
11 | location.href = | ||
12 | 'https://accounts.google.com/AccountChooser?continue=https://calendar.google.com/u/0/'; | ||
13 | } | ||
14 | Ferdium.injectCSS(_path.default.join(__dirname, 'calendar.css')); | ||
15 | Ferdium.injectJSUnsafe(_path.default.join(__dirname, 'webview-unsafe.js')); | ||
16 | }; | ||