Skip to content

Commit

Permalink
Init
Browse files Browse the repository at this point in the history
  • Loading branch information
wardbeyens committed Sep 5, 2022
0 parents commit d698d6c
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 0 deletions.
19 changes: 19 additions & 0 deletions contentScript.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
const removePayWall = () => {
const unwantedElements = document.querySelectorAll(
"[data-temptation-position]"
);
unwantedElements.forEach((elm) => {
console.log("Removed: ", elm);
elm.remove();
});
};

const unhideAllElements = () => {
const hiddenItems = document.querySelectorAll("[style]");
Array.prototype.forEach.call(hiddenItems, (elm) => {
elm.style.cssText = elm.style.cssText.replace(/display: none;/g, "");
});
};

removePayWall();
unhideAllElements();
Binary file added icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 22 additions & 0 deletions manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"manifest_version": 3,
"name": "Humo Paywall remover",
"version": "0.1",
"description": "This extension removes the paywall from articles of the newspaper 'HUMO'.",
"icons": {
"16": "icon.png",
"48": "icon.png",
"128": "icon.png"
},
"content_scripts": [
{
"matches": [
"https://*.humo.be/*",
"https://*.demorgen.be/*"
],
"js": [
"contentScript.js"
]
}
]
}

0 comments on commit d698d6c

Please sign in to comment.