File tree 4 files changed +37
-0
lines changed
4 files changed +37
-0
lines changed Original file line number Diff line number Diff line change
1
+ chrome . browserAction . onClicked . addListener ( function ( tab ) {
2
+ // Get the current tab's URL
3
+ var currentUrl = tab . url ;
4
+
5
+ // Modify the URL (replace "medium.com" with "mediumfree.com")
6
+ var redirectUrl = currentUrl . replace ( "medium.com" , "medium-free.vercel.app/read?url=" + currentUrl ) ;
7
+
8
+ // Redirect the tab to the modified URL
9
+ chrome . tabs . update ( tab . id , { url : redirectUrl } ) ;
10
+ } ) ;
Original file line number Diff line number Diff line change
1
+ {
2
+ "manifest_version" : 2 ,
3
+ "name" : " Medium Free" ,
4
+ "version" : " 1.0" ,
5
+ "description" : " Remove Paywall of Medium.com Articles and Enjoy the Content for Free." ,
6
+ "permissions" : [
7
+ " tabs"
8
+ ],
9
+ "browser_action" : {
10
+ "default_icon" : {
11
+ "16" : " logo.png" ,
12
+ "48" : " logo.png" ,
13
+ "128" : " logo.png"
14
+ },
15
+ "default_title" : " Medium Free"
16
+ },
17
+ "background" : {
18
+ "scripts" : [" background.js" ],
19
+ "persistent" : false
20
+ },
21
+ "content_scripts" : [
22
+ {
23
+ "matches" : [" https://medium.com/*" ],
24
+ "js" : [" content.js" ]
25
+ }
26
+ ]
27
+ }
You can’t perform that action at this time.
0 commit comments