diff options
Diffstat (limited to 'recipes/instagram')
-rw-r--r-- | recipes/instagram/index.js | 4 | ||||
-rw-r--r-- | recipes/instagram/package.json | 2 | ||||
-rw-r--r-- | recipes/instagram/webview.js | 10 |
3 files changed, 8 insertions, 8 deletions
diff --git a/recipes/instagram/index.js b/recipes/instagram/index.js index 928d5b1..d8beaa5 100644 --- a/recipes/instagram/index.js +++ b/recipes/instagram/index.js | |||
@@ -1,5 +1,5 @@ | |||
1 | module.exports = Ferdi => class Instagram extends Ferdi { | 1 | module.exports = Ferdium => class Instagram extends Ferdium { |
2 | overrideUserAgent() { | 2 | overrideUserAgent() { |
3 | return window.navigator.userAgent.replace(/(Ferdi|Electron)\/\S+ \([^)]+\)/g, '').trim(); | 3 | return window.navigator.userAgent.replace(/(Ferdium|Electron)\/\S+ \([^)]+\)/g, '').trim(); |
4 | } | 4 | } |
5 | }; | 5 | }; |
diff --git a/recipes/instagram/package.json b/recipes/instagram/package.json index 7771412..820872c 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.3.0", | 4 | "version": "2.4.0", |
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 e04a5c8..66d89e6 100644 --- a/recipes/instagram/webview.js +++ b/recipes/instagram/webview.js | |||
@@ -4,17 +4,17 @@ function _interopRequireDefault(obj) { | |||
4 | return obj && obj.__esModule ? obj : { default: obj }; | 4 | return obj && obj.__esModule ? obj : { default: obj }; |
5 | } | 5 | } |
6 | 6 | ||
7 | module.exports = Ferdi => { | 7 | module.exports = Ferdium => { |
8 | const getMessages = () => { | 8 | const getMessages = () => { |
9 | const element = document.querySelector('a[href^="/direct/inbox"]'); | 9 | const element = document.querySelector('a[href^="/direct/inbox"]'); |
10 | Ferdi.setBadge(element ? Ferdi.safeParseInt(element.textContent) : 0); | 10 | Ferdium.setBadge(element ? Ferdium.safeParseInt(element.textContent) : 0); |
11 | }; | 11 | }; |
12 | 12 | ||
13 | Ferdi.loop(getMessages); | 13 | Ferdium.loop(getMessages); |
14 | 14 | ||
15 | // https://github.com/ferdium/ferdium-recipes/blob/9d715597a600710c20f75412d3dcd8cdb7b3c39e/docs/frontend_api.md#usage-4 | 15 | // https://github.com/ferdium/ferdium-recipes/blob/9d715597a600710c20f75412d3dcd8cdb7b3c39e/docs/frontend_api.md#usage-4 |
16 | // Helper that activates DarkReader and injects your darkmode.css at the same time | 16 | // Helper that activates DarkReader and injects your darkmode.css at the same time |
17 | Ferdi.handleDarkMode((isEnabled, helpers) => { | 17 | Ferdium.handleDarkMode((isEnabled, helpers) => { |
18 | if (isEnabled) { | 18 | if (isEnabled) { |
19 | helpers.enableDarkMode(); | 19 | helpers.enableDarkMode(); |
20 | if (!helpers.isDarkModeStyleInjected()) { | 20 | if (!helpers.isDarkModeStyleInjected()) { |
@@ -26,5 +26,5 @@ module.exports = Ferdi => { | |||
26 | } | 26 | } |
27 | }); | 27 | }); |
28 | 28 | ||
29 | Ferdi.injectCSS(_path.default.join(__dirname, 'service.css')); | 29 | Ferdium.injectCSS(_path.default.join(__dirname, 'service.css')); |
30 | }; | 30 | }; |