File tree Expand file tree Collapse file tree 3 files changed +26
-7
lines changed Expand file tree Collapse file tree 3 files changed +26
-7
lines changed Original file line number Diff line number Diff line change @@ -48,3 +48,6 @@ Version 1.3.0
48
48
Version 1.3.1
49
49
- Removed unnecessary timeout-based loop;
50
50
- Removed forgotten console log printers.
51
+
52
+ Version 1.4.0
53
+ - Added functionality to uncover article when a paywall should be shown.
Original file line number Diff line number Diff line change 1
1
setTimeout ( function ( ) {
2
2
if ( document . readyState === "loading" ) {
3
- document . addEventListener ( "DOMContentLoaded" , unlockArticle ) ;
3
+ document . addEventListener ( "DOMContentLoaded" , main ) ;
4
4
} else {
5
- removePaywall ( ) ;
6
- unlockArticle ( ) ;
7
- closeVideoPopUp ( ) ;
8
- removeBlurFilter ( ) ;
9
- removeExcessSpacing ( )
5
+ main ( )
10
6
}
11
7
} , 100 ) ;
12
8
9
+ function main ( ) {
10
+ removePaywall ( ) ;
11
+ unlockArticle ( ) ;
12
+ closeVideoPopUp ( ) ;
13
+ removeBlurFilter ( ) ;
14
+ removeExcessSpacing ( ) ;
15
+ uncoverBodyText ( ) ;
16
+ }
17
+
13
18
function removePaywall ( ) {
14
19
setTimeout ( function ( ) {
15
20
document . body . style . overflow = "scroll" ;
@@ -67,3 +72,14 @@ function removeExcessSpacing () {
67
72
}
68
73
}
69
74
}
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
+ }
Original file line number Diff line number Diff line change 1
1
{
2
2
"manifest_version" : 2 ,
3
3
"name" : " Anti-Messaggero" ,
4
- "version" : " 1.3.1 " ,
4
+ "version" : " 1.4.0 " ,
5
5
"description" : " Automatically remove the paywall that blocks a user from reading an article and the pop-up containing the video attached to it." ,
6
6
"homepage_url" : " https://github.com/lorenzodb1/anti-messaggero" ,
7
7
"icons" : {
You can’t perform that action at this time.
0 commit comments