diff --git a/background.js b/background.js new file mode 100644 index 0000000..35f2af2 --- /dev/null +++ b/background.js @@ -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 }); +}); diff --git a/content.js b/content.js new file mode 100644 index 0000000..e69de29 diff --git a/logo.png b/logo.png new file mode 100644 index 0000000..409797c Binary files /dev/null and b/logo.png differ diff --git a/manifest.json b/manifest.json new file mode 100644 index 0000000..7b2c75d --- /dev/null +++ b/manifest.json @@ -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"] + } + ] +}