aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/groupme/webview.js
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/groupme/webview.js
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/groupme/webview.js')
-rw-r--r--recipes/groupme/webview.js17
1 files changed, 14 insertions, 3 deletions
diff --git a/recipes/groupme/webview.js b/recipes/groupme/webview.js
index 0d5afc3..0f0d3a6 100644
--- a/recipes/groupme/webview.js
+++ b/recipes/groupme/webview.js
@@ -1,12 +1,21 @@
1function _interopRequireDefault(obj) {
2 return obj && obj.__esModule ? obj : { default: obj };
3}
4
5const _path = _interopRequireDefault(require('path'));
6
1module.exports = Ferdium => { 7module.exports = Ferdium => {
2 const getMessages = () => { 8 const getMessages = () => {
3
4 // array-ify the list of conversations 9 // array-ify the list of conversations
5 const allConversations = [...document.querySelectorAll('#tray .tray-list .list-item')] 10 const allConversations = [
11 ...document.querySelectorAll('#tray .tray-list .list-item'),
12 ];
6 // for each conversation on the list... 13 // for each conversation on the list...
7 const filteredConversations = allConversations.filter(e => { 14 const filteredConversations = allConversations.filter(e => {
8 // keep it on the list if [1] it has unread messages (not .ng-hide), and [2] it isn't muted (not .overlay) 15 // keep it on the list if [1] it has unread messages (not .ng-hide), and [2] it isn't muted (not .overlay)
9 return (!e.innerHTML.includes('ng-hide') && !e.innerHTML.includes('overlay')) 16 return (
17 !e.innerHTML.includes('ng-hide') && !e.innerHTML.includes('overlay')
18 );
10 }); 19 });
11 const unreadConversations = filteredConversations.length; 20 const unreadConversations = filteredConversations.length;
12 21
@@ -15,4 +24,6 @@ module.exports = Ferdium => {
15 }; 24 };
16 25
17 Ferdium.loop(getMessages); 26 Ferdium.loop(getMessages);
27
28 Ferdium.injectCSS(_path.default.join(__dirname, 'service.css'));
18}; 29};