aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/instagram/webview.js
diff options
context:
space:
mode:
authorLibravatar Vijay A <vraravam@users.noreply.github.com>2022-04-18 06:51:50 -0500
committerLibravatar Vijay A <vraravam@users.noreply.github.com>2022-04-18 06:51:50 -0500
commit18801ed0c02627e87639dc0848cab44dacc18be2 (patch)
tree15e56ba66c68bf7b4594e6c9fdef44e037b4be31 /recipes/instagram/webview.js
parentRemove deprecated webPreference flag (diff)
downloadferdium-recipes-18801ed0c02627e87639dc0848cab44dacc18be2.tar.gz
ferdium-recipes-18801ed0c02627e87639dc0848cab44dacc18be2.tar.zst
ferdium-recipes-18801ed0c02627e87639dc0848cab44dacc18be2.zip
Rebranded from 'ferdi' to 'ferdium' (companion changes for the main repo PR #2)
Diffstat (limited to 'recipes/instagram/webview.js')
-rw-r--r--recipes/instagram/webview.js10
1 files changed, 5 insertions, 5 deletions
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
7module.exports = Ferdi => { 7module.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};