aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/reddit
diff options
context:
space:
mode:
authorLibravatar Vijay Raghavan Aravamudhan <vraravam@users.noreply.github.com>2021-08-27 18:13:24 +0530
committerLibravatar GitHub <noreply@github.com>2021-08-27 18:13:24 +0530
commit155c4b832281348c16be1f4ef667e6e23dbf1bd8 (patch)
treed144e2de2e6c7fb2e334246e8a4aecdbeb08ef8d /recipes/reddit
parentdocs: fixed template file for creating recipe. (diff)
downloadferdium-recipes-155c4b832281348c16be1f4ef667e6e23dbf1bd8.tar.gz
ferdium-recipes-155c4b832281348c16be1f4ef667e6e23dbf1bd8.tar.zst
ferdium-recipes-155c4b832281348c16be1f4ef667e6e23dbf1bd8.zip
chore: normalized all recipes to ensure compatibility with es6 (#639)
- Removed some calls to set badge with '0' all the time. - Removed all 'sourceMaps' since they are all outdated atm.
Diffstat (limited to 'recipes/reddit')
-rw-r--r--recipes/reddit/index.js2
-rw-r--r--recipes/reddit/package.json2
-rw-r--r--recipes/reddit/webview.js10
3 files changed, 7 insertions, 7 deletions
diff --git a/recipes/reddit/index.js b/recipes/reddit/index.js
index 258da41..23607bd 100644
--- a/recipes/reddit/index.js
+++ b/recipes/reddit/index.js
@@ -1 +1 @@
module.exports = Franz => Franz; module.exports = Ferdi => Ferdi;
diff --git a/recipes/reddit/package.json b/recipes/reddit/package.json
index 4c12bb3..7dd62e2 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.0.2", 4 "version": "1.1.0",
5 "license": "MIT", 5 "license": "MIT",
6 "repository": "https://github.com/getferdi/recipes", 6 "repository": "https://github.com/getferdi/recipes",
7 "config": { 7 "config": {
diff --git a/recipes/reddit/webview.js b/recipes/reddit/webview.js
index 9d49f47..dc83d3d 100644
--- a/recipes/reddit/webview.js
+++ b/recipes/reddit/webview.js
@@ -2,7 +2,7 @@ const _path = _interopRequireDefault(require('path'));
2 2
3function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 3function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
4 4
5module.exports = (Franz) => { 5module.exports = (Ferdi) => {
6 const getMessages = function getMessages() { 6 const getMessages = function getMessages() {
7 const elements = document.querySelectorAll('#HeaderUserActions--Messages > a > span'); 7 const elements = document.querySelectorAll('#HeaderUserActions--Messages > a > span');
8 let count = 0; 8 let count = 0;
@@ -12,7 +12,7 @@ module.exports = (Franz) => {
12 } 12 }
13 13
14 console.log(count); 14 console.log(count);
15 Franz.setBadge(count); 15 Ferdi.setBadge(count);
16 }; 16 };
17 17
18 if (document.querySelectorAll('.promotedlink').length > 0) { 18 if (document.querySelectorAll('.promotedlink').length > 0) {
@@ -21,12 +21,12 @@ module.exports = (Franz) => {
21 }); 21 });
22 } 22 }
23 23
24 Franz.loop(getMessages); 24 Ferdi.loop(getMessages);
25 25
26 // Use CSS to hide Google Ads 26 // Use CSS to hide Google Ads
27 Franz.injectCSS(_path.default.join(__dirname, 'service.css')); 27 Ferdi.injectCSS(_path.default.join(__dirname, 'service.css'));
28 28
29 Franz.handleDarkMode((isEnabled, config) => { 29 Ferdi.handleDarkMode((isEnabled, config) => {
30 // Open dropdown menu if not already open 30 // Open dropdown menu if not already open
31 const menu = document.querySelector('#USER_DROPDOWN_ID'); 31 const menu = document.querySelector('#USER_DROPDOWN_ID');
32 if (menu.getAttribute('aria-expanded') === 'false') { 32 if (menu.getAttribute('aria-expanded') === 'false') {