Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
nishantshah977 authored Dec 31, 2023
1 parent 765aa6b commit 9c4c381
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 0 deletions.
10 changes: 10 additions & 0 deletions background.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
chrome.browserAction.onClicked.addListener(function(tab) {
// Get the current tab's URL
var currentUrl = tab.url;

// Modify the URL (replace "medium.com" with "mediumfree.com")
var redirectUrl = currentUrl.replace("medium.com", "medium-free.vercel.app/read?url="+currentUrl);

// Redirect the tab to the modified URL
chrome.tabs.update(tab.id, { url: redirectUrl });
});
Empty file added content.js
Empty file.
Binary file added logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
27 changes: 27 additions & 0 deletions manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"manifest_version": 2,
"name": "Medium Free",
"version": "1.0",
"description": "Remove Paywall of Medium.com Articles and Enjoy the Content for Free.",
"permissions": [
"tabs"
],
"browser_action": {
"default_icon": {
"16": "logo.png",
"48": "logo.png",
"128": "logo.png"
},
"default_title": "Medium Free"
},
"background": {
"scripts": ["background.js"],
"persistent": false
},
"content_scripts": [
{
"matches": ["https://medium.com/*"],
"js": ["content.js"]
}
]
}

0 comments on commit 9c4c381

Please sign in to comment.