From 9b8f01716774a960073e944823ab727cc867a8f6 Mon Sep 17 00:00:00 2001 From: MCMXC <16797721+mcmxcdev@users.noreply.github.com> Date: Wed, 26 Jul 2023 06:29:03 -0600 Subject: 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 --- recipes/googlemeet/icon.svg | 1 - recipes/googlemeet/index.js | 1 - recipes/googlemeet/package.json | 10 ---------- recipes/googlemeet/service.css | 5 ----- recipes/googlemeet/webview.js | 36 ------------------------------------ 5 files changed, 53 deletions(-) delete mode 100644 recipes/googlemeet/icon.svg delete mode 100644 recipes/googlemeet/index.js delete mode 100644 recipes/googlemeet/package.json delete mode 100644 recipes/googlemeet/service.css delete mode 100644 recipes/googlemeet/webview.js (limited to 'recipes/googlemeet') diff --git a/recipes/googlemeet/icon.svg b/recipes/googlemeet/icon.svg deleted file mode 100644 index 4b5a0d3..0000000 --- a/recipes/googlemeet/icon.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/recipes/googlemeet/index.js b/recipes/googlemeet/index.js deleted file mode 100644 index dd41f72..0000000 --- a/recipes/googlemeet/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = Ferdium => Ferdium; diff --git a/recipes/googlemeet/package.json b/recipes/googlemeet/package.json deleted file mode 100644 index 637e722..0000000 --- a/recipes/googlemeet/package.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "id": "googlemeet", - "name": "Google Meet", - "version": "2.3.1", - "license": "MIT", - "config": { - "serviceURL": "https://meet.google.com/u/0/", - "hasNotificationSound": true - } -} diff --git a/recipes/googlemeet/service.css b/recipes/googlemeet/service.css deleted file mode 100644 index b453fd4..0000000 --- a/recipes/googlemeet/service.css +++ /dev/null @@ -1,5 +0,0 @@ -.app-wrapper-web .app { - width: 100% !important; - height: 100% !important; - top: 0 !important; -} diff --git a/recipes/googlemeet/webview.js b/recipes/googlemeet/webview.js deleted file mode 100644 index f3c0f46..0000000 --- a/recipes/googlemeet/webview.js +++ /dev/null @@ -1,36 +0,0 @@ -const _path = _interopRequireDefault(require('path')); - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { default: obj }; -} - -window.addEventListener('load', () => { - const title = document.querySelector('.window-title').textContent; - - if (title && title.includes('Google Chrome 36+')) { - window.location.reload(); - } -}); - -module.exports = (Ferdium, settings) => { - const getMessages = () => { - const elements = document.querySelectorAll('.CxUIE, .unread'); - let count = 0; - - for (const element of elements) { - if (element.querySelectorAll('*[data-icon="muted"]').length === 0) { - count += 1; - } - } - - Ferdium.setBadge(count); - }; - - Ferdium.loop(getMessages); - - window.addEventListener('beforeunload', async () => { - Ferdium.clearStorageData(settings.id, { storages: ['serviceworkers'] }); - }); - - Ferdium.injectCSS(_path.default.join(__dirname, 'service.css')); -}; -- cgit v1.2.3-70-g09d2