Skip to content

Commit abe2732

Browse files
committed
Version 1.4.0
1 parent c63571a commit abe2732

File tree

3 files changed

+26
-7
lines changed

3 files changed

+26
-7
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,6 @@ Version 1.3.0
4848
Version 1.3.1
4949
- Removed unnecessary timeout-based loop;
5050
- Removed forgotten console log printers.
51+
52+
Version 1.4.0
53+
- Added functionality to uncover article when a paywall should be shown.

antimessaggero.js

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,20 @@
11
setTimeout(function () {
22
if (document.readyState === "loading") {
3-
document.addEventListener("DOMContentLoaded", unlockArticle);
3+
document.addEventListener("DOMContentLoaded", main);
44
} else {
5-
removePaywall();
6-
unlockArticle();
7-
closeVideoPopUp();
8-
removeBlurFilter();
9-
removeExcessSpacing()
5+
main()
106
}
117
}, 100);
128

9+
function main () {
10+
removePaywall();
11+
unlockArticle();
12+
closeVideoPopUp();
13+
removeBlurFilter();
14+
removeExcessSpacing();
15+
uncoverBodyText();
16+
}
17+
1318
function removePaywall () {
1419
setTimeout(function () {
1520
document.body.style.overflow = "scroll";
@@ -67,3 +72,14 @@ function removeExcessSpacing () {
6772
}
6873
}
6974
}
75+
76+
function uncoverBodyText () {
77+
let elem = document.body.getElementsByClassName("body-text")[0];
78+
setTimeout(function () {
79+
if (elem.style.length === 3) {
80+
elem.style = null
81+
} else {
82+
uncoverBodyText();
83+
}
84+
}, 100);
85+
}

manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"manifest_version": 2,
33
"name": "Anti-Messaggero",
4-
"version": "1.3.1",
4+
"version": "1.4.0",
55
"description": "Automatically remove the paywall that blocks a user from reading an article and the pop-up containing the video attached to it.",
66
"homepage_url": "https://github.com/lorenzodb1/anti-messaggero",
77
"icons": {

0 commit comments

Comments
 (0)