diff options
author | 2023-08-23 16:15:50 +0100 | |
---|---|---|
committer | 2023-08-23 16:15:50 +0100 | |
commit | 8f9e6c8ccd0d49b155ab8e680b3db62b18479bca (patch) | |
tree | 9abc3ad84666dcdda5865321201cd0cbe5f284ce /recipes/reddit | |
parent | Update google-calendar recipe to load external scripts to fix CSP error (#402) (diff) | |
download | ferdium-recipes-8f9e6c8ccd0d49b155ab8e680b3db62b18479bca.tar.gz ferdium-recipes-8f9e6c8ccd0d49b155ab8e680b3db62b18479bca.tar.zst ferdium-recipes-8f9e6c8ccd0d49b155ab8e680b3db62b18479bca.zip |
Fix Reddit webpage not rendering (#404)
Diffstat (limited to 'recipes/reddit')
-rw-r--r-- | recipes/reddit/package.json | 2 | ||||
-rw-r--r-- | recipes/reddit/webview.js | 11 |
2 files changed, 1 insertions, 12 deletions
diff --git a/recipes/reddit/package.json b/recipes/reddit/package.json index 07b7112..b20f4bc 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.3.0", | 4 | "version": "1.4.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 aac3766..7b36b1a 100644 --- a/recipes/reddit/webview.js +++ b/recipes/reddit/webview.js | |||
@@ -18,17 +18,6 @@ module.exports = Ferdium => { | |||
18 | Ferdium.setBadge(count); | 18 | Ferdium.setBadge(count); |
19 | }; | 19 | }; |
20 | 20 | ||
21 | if (document.querySelectorAll('.promotedlink').length > 0) { | ||
22 | for (const sponsoredLink of document.querySelectorAll('.promotedlink')) { | ||
23 | if ( | ||
24 | sponsoredLink.parentElement && | ||
25 | sponsoredLink.parentElement.parentElement | ||
26 | ) { | ||
27 | sponsoredLink.parentElement.parentElement.style.display = 'none'; | ||
28 | } | ||
29 | } | ||
30 | } | ||
31 | |||
32 | Ferdium.loop(getMessages); | 21 | Ferdium.loop(getMessages); |
33 | 22 | ||
34 | // Use CSS to hide Google Ads | 23 | // Use CSS to hide Google Ads |