diff options
Diffstat (limited to 'recipes/reddit/webview.js')
-rw-r--r-- | recipes/reddit/webview.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/recipes/reddit/webview.js b/recipes/reddit/webview.js index 8d165aa..e8498ac 100644 --- a/recipes/reddit/webview.js +++ b/recipes/reddit/webview.js | |||
@@ -4,7 +4,7 @@ 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 elements = document.querySelectorAll( | 9 | const elements = document.querySelectorAll( |
10 | '#HeaderUserActions--Messages > a > span', | 10 | '#HeaderUserActions--Messages > a > span', |
@@ -12,10 +12,10 @@ module.exports = Ferdi => { | |||
12 | let count = 0; | 12 | let count = 0; |
13 | 13 | ||
14 | if (elements[0]) { | 14 | if (elements[0]) { |
15 | count = Ferdi.safeParseInt(elements[0].textContent); | 15 | count = Ferdium.safeParseInt(elements[0].textContent); |
16 | } | 16 | } |
17 | 17 | ||
18 | Ferdi.setBadge(count); | 18 | Ferdium.setBadge(count); |
19 | }; | 19 | }; |
20 | 20 | ||
21 | if (document.querySelectorAll('.promotedlink').length > 0) { | 21 | if (document.querySelectorAll('.promotedlink').length > 0) { |
@@ -29,12 +29,12 @@ module.exports = Ferdi => { | |||
29 | } | 29 | } |
30 | } | 30 | } |
31 | 31 | ||
32 | Ferdi.loop(getMessages); | 32 | Ferdium.loop(getMessages); |
33 | 33 | ||
34 | // Use CSS to hide Google Ads | 34 | // Use CSS to hide Google Ads |
35 | Ferdi.injectCSS(_path.default.join(__dirname, 'service.css')); | 35 | Ferdium.injectCSS(_path.default.join(__dirname, 'service.css')); |
36 | 36 | ||
37 | Ferdi.handleDarkMode(isEnabled => { | 37 | Ferdium.handleDarkMode(isEnabled => { |
38 | // Open dropdown menu if not already open | 38 | // Open dropdown menu if not already open |
39 | const menu = document.querySelector('#USER_DROPDOWN_ID'); | 39 | const menu = document.querySelector('#USER_DROPDOWN_ID'); |
40 | if (menu && menu.getAttribute('aria-expanded') === 'false') { | 40 | if (menu && menu.getAttribute('aria-expanded') === 'false') { |