aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/zoom
diff options
context:
space:
mode:
authorLibravatar MCMXC <16797721+mcmxcdev@users.noreply.github.com>2023-07-26 06:29:03 -0600
committerLibravatar GitHub <noreply@github.com>2023-07-26 17:59:03 +0530
commit9b8f01716774a960073e944823ab727cc867a8f6 (patch)
tree732b83770baa78f5cf12776aaa33ce65bebfa418 /recipes/zoom
parentAdd Excalidraw recipe (#393) (diff)
downloadferdium-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/zoom')
-rw-r--r--recipes/zoom/index.js3
-rw-r--r--recipes/zoom/package.json2
-rw-r--r--recipes/zoom/webview.js44
3 files changed, 27 insertions, 22 deletions
diff --git a/recipes/zoom/index.js b/recipes/zoom/index.js
index 8fd90b1..dd41f72 100644
--- a/recipes/zoom/index.js
+++ b/recipes/zoom/index.js
@@ -1,2 +1 @@
1"use strict"; module.exports = Ferdium => Ferdium;
2module.exports = Ferdium => Ferdium
diff --git a/recipes/zoom/package.json b/recipes/zoom/package.json
index 8be139d..92a9490 100644
--- a/recipes/zoom/package.json
+++ b/recipes/zoom/package.json
@@ -1,7 +1,7 @@
1{ 1{
2 "id": "zoom", 2 "id": "zoom",
3 "name": "Zoom", 3 "name": "Zoom",
4 "version": "1.3.5", 4 "version": "1.4.0",
5 "license": "MIT", 5 "license": "MIT",
6 "config": { 6 "config": {
7 "serviceURL": "https://zoom.us/join", 7 "serviceURL": "https://zoom.us/join",
diff --git a/recipes/zoom/webview.js b/recipes/zoom/webview.js
index 45cc5b7..f606ac9 100644
--- a/recipes/zoom/webview.js
+++ b/recipes/zoom/webview.js
@@ -1,9 +1,9 @@
1const _path = _interopRequireDefault(require('path'));
2
3function _interopRequireDefault(obj) { 1function _interopRequireDefault(obj) {
4 return obj && obj.__esModule ? obj : { default: obj }; 2 return obj && obj.__esModule ? obj : { default: obj };
5} 3}
6 4
5const _path = _interopRequireDefault(require('path'));
6
7module.exports = (Ferdium, settings) => { 7module.exports = (Ferdium, settings) => {
8 const getMessages = () => { 8 const getMessages = () => {
9 let directCount = 0; 9 let directCount = 0;
@@ -27,23 +27,29 @@ module.exports = (Ferdium, settings) => {
27 Ferdium.injectCSS(_path.default.join(__dirname, 'service.css')); 27 Ferdium.injectCSS(_path.default.join(__dirname, 'service.css'));
28 28
29 // TODO: See how this can be moved into the main ferdium app and sent as an ipc message for opening with a new window or same Ferdium recipe's webview based on user's preferences 29 // TODO: See how this can be moved into the main ferdium app and sent as an ipc message for opening with a new window or same Ferdium recipe's webview based on user's preferences
30 document.addEventListener('click', event => { 30 document.addEventListener(
31 const link = event.target.closest('a[href^="http"]'); 31 'click',
32 const button = event.target.closest('button[title^="http"]'); 32 event => {
33 33 const link = event.target.closest('a[href^="http"]');
34 if (link || button) { 34 const button = event.target.closest('button[title^="http"]');
35 const url = link ? link.getAttribute('href') : button.getAttribute('title'); 35
36 36 if (link || button) {
37 if (!Ferdium.isImage(link)) { 37 const url = link
38 event.preventDefault(); 38 ? link.getAttribute('href')
39 event.stopPropagation(); 39 : button.getAttribute('title');
40 40
41 if (settings.trapLinkClicks === true) { 41 if (!Ferdium.isImage(link)) {
42 window.location.href = url; 42 event.preventDefault();
43 } else { 43 event.stopPropagation();
44 Ferdium.openNewWindow(url); 44
45 if (settings.trapLinkClicks === true) {
46 window.location.href = url;
47 } else {
48 Ferdium.openNewWindow(url);
49 }
45 } 50 }
46 } 51 }
47 } 52 },
48 }, true); 53 true,
54 );
49}; 55};