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

Commit

Permalink
Fix: extension not working for pages with only list items in content
Browse files Browse the repository at this point in the history
  • Loading branch information
krisztianb committed Oct 27, 2024
1 parent 387a1dd commit 2ceca26
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
debug
4 changes: 2 additions & 2 deletions paywall-remover.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ let content = ""; // Stores the original full non-pay-walled content

// Code checking if the page has finished loading the full content
new window.MutationObserver(() => {
// Here we assume that the page contains at least one paragraph
const hasFullArticleLoaded = document.querySelector("p.paywall-full-content") != null;
// Here we assume that the page contains at least one paragraph or list item
const hasFullArticleLoaded = document.querySelector(".paywall-full-content:is(p,li)") != null;

if (hasFullArticleLoaded) {
removePayWallMarkersFromPage();
Expand Down

0 comments on commit 2ceca26

Please sign in to comment.