diff options
author | 2023-07-26 06:29:03 -0600 | |
---|---|---|
committer | 2023-07-26 17:59:03 +0530 | |
commit | 9b8f01716774a960073e944823ab727cc867a8f6 (patch) | |
tree | 732b83770baa78f5cf12776aaa33ce65bebfa418 /recipes/instagram-direct-messages/webview.js | |
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/instagram-direct-messages/webview.js')
-rw-r--r-- | recipes/instagram-direct-messages/webview.js | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/recipes/instagram-direct-messages/webview.js b/recipes/instagram-direct-messages/webview.js index a59013a..01187b8 100644 --- a/recipes/instagram-direct-messages/webview.js +++ b/recipes/instagram-direct-messages/webview.js | |||
@@ -1,21 +1,21 @@ | |||
1 | "use strict"; | ||
2 | |||
3 | const _path = _interopRequireDefault(require('path')); | ||
4 | |||
5 | function _interopRequireDefault(obj) { | 1 | function _interopRequireDefault(obj) { |
6 | return obj && obj.__esModule ? obj : { default: obj }; | 2 | return obj && obj.__esModule ? obj : { default: obj }; |
7 | } | 3 | } |
8 | 4 | ||
5 | const _path = _interopRequireDefault(require('path')); | ||
6 | |||
9 | setInterval(() => { | 7 | setInterval(() => { |
10 | document.querySelector("._lz6s.Hz2lF").style.display = "none"; | 8 | document.querySelector('._lz6s.Hz2lF').style.display = 'none'; |
11 | document.querySelector(".t30g8.L1C6I").style.paddingTop = 0; | 9 | document.querySelector('.t30g8.L1C6I').style.paddingTop = 0; |
12 | document.querySelector(".i0EQd").style.maxWidth = 'unset !important'; | 10 | document.querySelector('.i0EQd').style.maxWidth = 'unset !important'; |
13 | }, 3000); | 11 | }, 3000); |
14 | 12 | ||
15 | module.exports = (Ferdium) => { | 13 | module.exports = Ferdium => { |
16 | const getMessages = () => { | 14 | const getMessages = () => { |
17 | const element = document.querySelector('a[href^="/direct/inbox"]'); | 15 | const element = document.querySelector('a[href^="/direct/inbox"]'); |
18 | Ferdium.setBadge(element.textContent ? Ferdium.safeParseInt(element.textContent) : 0); | 16 | Ferdium.setBadge( |
17 | element.textContent ? Ferdium.safeParseInt(element.textContent) : 0, | ||
18 | ); | ||
19 | }; | 19 | }; |
20 | 20 | ||
21 | Ferdium.loop(getMessages); | 21 | Ferdium.loop(getMessages); |