diff options
Diffstat (limited to 'recipes/reddit')
-rw-r--r-- | recipes/reddit/index.js | 2 | ||||
-rw-r--r-- | recipes/reddit/package.json | 2 | ||||
-rw-r--r-- | recipes/reddit/webview.js | 12 |
3 files changed, 8 insertions, 8 deletions
diff --git a/recipes/reddit/index.js b/recipes/reddit/index.js index 23607bd..dd41f72 100644 --- a/recipes/reddit/index.js +++ b/recipes/reddit/index.js | |||
@@ -1 +1 @@ | |||
module.exports = Ferdi => Ferdi; | module.exports = Ferdium => Ferdium; | ||
diff --git a/recipes/reddit/package.json b/recipes/reddit/package.json index bcb002f..42e4fbc 100644 --- a/recipes/reddit/package.json +++ b/recipes/reddit/package.json | |||
@@ -1,7 +1,7 @@ | |||
1 | { | 1 | { |
2 | "id": "reddit", | 2 | "id": "reddit", |
3 | "name": "Reddit", | 3 | "name": "Reddit", |
4 | "version": "1.1.2", | 4 | "version": "1.2.0", |
5 | "license": "MIT", | 5 | "license": "MIT", |
6 | "repository": "https://github.com/ferdium/ferdium-recipes", | 6 | "repository": "https://github.com/ferdium/ferdium-recipes", |
7 | "config": { | 7 | "config": { |
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') { |