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/pulse-sms/LICENSE | 7 +++++++ recipes/pulse-sms/icon.svg | 1 + recipes/pulse-sms/index.js | 1 + recipes/pulse-sms/package.json | 10 ++++++++++ recipes/pulse-sms/webview.js | 17 +++++++++++++++++ 5 files changed, 36 insertions(+) create mode 100644 recipes/pulse-sms/LICENSE create mode 100644 recipes/pulse-sms/icon.svg create mode 100644 recipes/pulse-sms/index.js create mode 100644 recipes/pulse-sms/package.json create mode 100644 recipes/pulse-sms/webview.js (limited to 'recipes/pulse-sms') diff --git a/recipes/pulse-sms/LICENSE b/recipes/pulse-sms/LICENSE new file mode 100644 index 0000000..8ac4a22 --- /dev/null +++ b/recipes/pulse-sms/LICENSE @@ -0,0 +1,7 @@ +Copyright 2019 Solomon Rubin + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/recipes/pulse-sms/icon.svg b/recipes/pulse-sms/icon.svg new file mode 100644 index 0000000..da3f9d3 --- /dev/null +++ b/recipes/pulse-sms/icon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/recipes/pulse-sms/index.js b/recipes/pulse-sms/index.js new file mode 100644 index 0000000..dd41f72 --- /dev/null +++ b/recipes/pulse-sms/index.js @@ -0,0 +1 @@ +module.exports = Ferdium => Ferdium; diff --git a/recipes/pulse-sms/package.json b/recipes/pulse-sms/package.json new file mode 100644 index 0000000..8cfdd5f --- /dev/null +++ b/recipes/pulse-sms/package.json @@ -0,0 +1,10 @@ +{ + "id": "pulse-sms", + "name": "PulseSMS", + "version": "1.4.0", + "license": "MIT", + "config": { + "serviceURL": "https://pulsesms.app", + "hasNotificationSound": true + } +} diff --git a/recipes/pulse-sms/webview.js b/recipes/pulse-sms/webview.js new file mode 100644 index 0000000..e2d7f40 --- /dev/null +++ b/recipes/pulse-sms/webview.js @@ -0,0 +1,17 @@ +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; +} + +const _path = _interopRequireDefault(require('path')); + +module.exports = Ferdium => { + const getMessages = () => { + Ferdium.setBadge( + document.querySelector('#unread_count').textContent.replaceAll(/\s/g, ''), + ); + }; + + Ferdium.loop(getMessages); + + Ferdium.injectCSS(_path.default.join(__dirname, 'service.css')); +}; -- cgit v1.2.3-54-g00ecf