Skip to content
This repository was archived by the owner on Nov 27, 2024. It is now read-only.

Commit f16bd0a

Browse files
committed
Adjust to modifications of seekingalpha HTML
1 parent ba08bec commit f16bd0a

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

manifest.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"manifest_version": 2,
33
"name": "Seeking Alpha Paywall Remover",
4-
"version": "1.3",
4+
"version": "1.4",
55
"description": "Removes the paywall from news and article pages on the seekingalpha.com website",
66
"icons": {
77
"48": "icons/48x48.png",

paywall-remover.js

+10-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
const payWallSelector = 'div:has(> div[role="dialog"])';
1+
const payWallSelector = "main + div > div + div";
2+
const overlaySelector = "div.bg-black\\/30";
23
const contentWrapperSelector = "#content";
34
const articleSelector = "main article section";
45

@@ -28,9 +29,14 @@ new window.MutationObserver(function (mutations) {
2829
}).observe(document, { subtree: true, attributes: true });
2930

3031
function hidePayWall() {
31-
const payWallOverlay = document.querySelector(payWallSelector);
32-
if (payWallOverlay) {
33-
payWallOverlay.setAttribute("style", "display:none");
32+
const payWallDialog = document.querySelector(payWallSelector);
33+
if (payWallDialog) {
34+
payWallDialog.setAttribute("style", "display:none");
35+
}
36+
37+
const overlay = document.querySelector(overlaySelector);
38+
if (overlay) {
39+
overlay.remove();
3440
}
3541
}
3642

0 commit comments

Comments
 (0)