diff options
author | Vijay A <vraravam@users.noreply.github.com> | 2022-04-18 06:51:50 -0500 |
---|---|---|
committer | Vijay A <vraravam@users.noreply.github.com> | 2022-04-18 06:51:50 -0500 |
commit | 18801ed0c02627e87639dc0848cab44dacc18be2 (patch) | |
tree | 15e56ba66c68bf7b4594e6c9fdef44e037b4be31 /recipes/pleroma/webview.js | |
parent | Remove deprecated webPreference flag (diff) | |
download | ferdium-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/pleroma/webview.js')
-rw-r--r-- | recipes/pleroma/webview.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/recipes/pleroma/webview.js b/recipes/pleroma/webview.js index c7a6530..41516f6 100644 --- a/recipes/pleroma/webview.js +++ b/recipes/pleroma/webview.js | |||
@@ -141,29 +141,29 @@ class LogoUpdater { | |||
141 | } | 141 | } |
142 | } | 142 | } |
143 | 143 | ||
144 | module.exports = Ferdi => { | 144 | module.exports = Ferdium => { |
145 | const getMessages = () => { | 145 | const getMessages = () => { |
146 | let directCount = 0; | 146 | let directCount = 0; |
147 | const matchArr = document.title.match(titleRegex); | 147 | const matchArr = document.title.match(titleRegex); |
148 | if (matchArr) { | 148 | if (matchArr) { |
149 | directCount = Ferdi.safeParseInt(matchArr[1]); | 149 | directCount = Ferdium.safeParseInt(matchArr[1]); |
150 | } | 150 | } |
151 | Ferdi.setBadge(directCount); | 151 | Ferdium.setBadge(directCount); |
152 | }; | 152 | }; |
153 | 153 | ||
154 | getInstanceLogo().then( | 154 | getInstanceLogo().then( |
155 | ({ logo, logoMask }) => { | 155 | ({ logo, logoMask }) => { |
156 | const updater = new LogoUpdater(logo, logoMask); | 156 | const updater = new LogoUpdater(logo, logoMask); |
157 | Ferdi.loop(() => { | 157 | Ferdium.loop(() => { |
158 | getMessages(); | 158 | getMessages(); |
159 | if (updater.update()) { | 159 | if (updater.update()) { |
160 | Ferdi.setAvatarImage(updater.toDataURL()); | 160 | Ferdium.setAvatarImage(updater.toDataURL()); |
161 | } | 161 | } |
162 | }); | 162 | }); |
163 | }, | 163 | }, |
164 | error => { | 164 | error => { |
165 | console.log('Failed to load instance logo', error); | 165 | console.log('Failed to load instance logo', error); |
166 | Ferdi.loop(getMessages); | 166 | Ferdium.loop(getMessages); |
167 | }, | 167 | }, |
168 | ); | 168 | ); |
169 | }; | 169 | }; |