Skip to content

Commit 9c4c381

Browse files
Add files via upload
1 parent 765aa6b commit 9c4c381

File tree

4 files changed

+37
-0
lines changed

4 files changed

+37
-0
lines changed

background.js

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
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+
});

content.js

Whitespace-only changes.

logo.png

1.74 KB
Loading

manifest.json

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
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+
}

0 commit comments

Comments
 (0)