diff options
Diffstat (limited to 'recipes/instagram')
-rw-r--r-- | recipes/instagram/package.json | 2 | ||||
-rw-r--r-- | recipes/instagram/webview.js | 14 |
2 files changed, 15 insertions, 1 deletions
diff --git a/recipes/instagram/package.json b/recipes/instagram/package.json index f804a11..a321b47 100644 --- a/recipes/instagram/package.json +++ b/recipes/instagram/package.json | |||
@@ -1,7 +1,7 @@ | |||
1 | { | 1 | { |
2 | "id": "instagram", | 2 | "id": "instagram", |
3 | "name": "Instagram", | 3 | "name": "Instagram", |
4 | "version": "2.2.2", | 4 | "version": "2.2.3", |
5 | "license": "MIT", | 5 | "license": "MIT", |
6 | "config": { | 6 | "config": { |
7 | "serviceURL": "https://instagram.com/direct/inbox", | 7 | "serviceURL": "https://instagram.com/direct/inbox", |
diff --git a/recipes/instagram/webview.js b/recipes/instagram/webview.js index 797f544..1fb253d 100644 --- a/recipes/instagram/webview.js +++ b/recipes/instagram/webview.js | |||
@@ -12,5 +12,19 @@ module.exports = Ferdi => { | |||
12 | 12 | ||
13 | Ferdi.loop(getMessages); | 13 | Ferdi.loop(getMessages); |
14 | 14 | ||
15 | // https://github.com/getferdi/recipes/blob/9d715597a600710c20f75412d3dcd8cdb7b3c39e/docs/frontend_api.md#usage-4 | ||
16 | // Helper that activates DarkReader and injects your darkmode.css at the same time | ||
17 | Ferdi.handleDarkMode((isEnabled, helpers) => { | ||
18 | if (isEnabled) { | ||
19 | helpers.enableDarkMode(); | ||
20 | if (!helpers.isDarkModeStyleInjected()) { | ||
21 | helpers.injectDarkModeStyle(); | ||
22 | } | ||
23 | } else { | ||
24 | helpers.disableDarkMode(); | ||
25 | helpers.removeDarkModeStyle(); | ||
26 | } | ||
27 | }); | ||
28 | |||
15 | Ferdi.injectCSS(_path.default.join(__dirname, 'service.css')); | 29 | Ferdi.injectCSS(_path.default.join(__dirname, 'service.css')); |
16 | }; | 30 | }; |