Skip to content

Commit

Permalink
added support for read-medium
Browse files Browse the repository at this point in the history
  • Loading branch information
Xatta-Trone committed Dec 12, 2023
1 parent a780eba commit 1d521a3
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 4 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ Or install manually


### Updates
#### 1.4.0
Added support for [https://readmedium.com/](https://readmedium.com/)
#### 1.3.2
Changed logo

Expand All @@ -65,3 +67,6 @@ Added support for all medium.com based websites such as:

### 1.0.1
Minor fixed and updates.

### 1.0.0
Initial release.
17 changes: 14 additions & 3 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ function runMedium(url) {
); //Set div attributes
a = document.createElement("a");
a.href = `http://webcache.googleusercontent.com/search?q=cache:${url}&strip=0&vwsrc=1&referer=medium-parser`; // Instead of calling setAttribute
a.innerHTML = "Read from Google Cache";
a.innerHTML = "Open in Google Cache";
a.setAttribute(
"style",
"padding:14px 25px; color:white; background: #242424; display:block;text-align:center;"
Expand All @@ -118,7 +118,7 @@ function runMedium(url) {

archive = document.createElement("a");
archive.href = `https://archive.today?url=${url}&run=1&referer=medium-parser`; // Instead of calling setAttribute
archive.innerHTML = "Read from Archive";
archive.innerHTML = "Open in Archive";
archive.setAttribute(
"style",
"padding:14px 25px; color:white; background: #242424; display:block; margin-top:10px;text-align:center;"
Expand All @@ -135,9 +135,20 @@ function runMedium(url) {
); //Set div attributes
oldAPI.setAttribute("target", "_blank"); //Set div attributes

// add readmedium.com
readMedium = document.createElement("a");
readMedium.href = `https://readmedium.com/${url}`; // Instead of calling setAttribute
readMedium.innerHTML = "Open in Read-Medium";
readMedium.setAttribute(
"style",
"padding:14px 25px; color:white; background: #242424; display:block; margin-top:10px;text-align:center;"
); //Set div attributes
readMedium.setAttribute("target", "_blank"); //Set div attributes

messageEl = createMessageElement();

leftDiv.appendChild(a); // Append the link to the div
leftDiv.appendChild(readMedium);
leftDiv.appendChild(archive);
leftDiv.appendChild(oldAPI);
leftDiv.appendChild(messageEl);
Expand Down Expand Up @@ -192,7 +203,7 @@ function createMessageElement() {
// old API
messageEl = document.createElement("div");
messageEl.innerHTML =
"Iframes/gists/embeds are not loaded in the Google Cache proxy. For those, use the Archive.is proxy instead.";
"Iframe/gist/embeds are not loaded in the Google Cache proxy. For those, please use the Read-Medium/Archive proxy instead.";
messageEl.setAttribute(
"style",
"padding:2px 4px; color:#242424; display:block; text-align:left;max-width: 212px;font-size: 0.83em;border: 1px solid black; margin-top:10px; position:relative;"
Expand Down
Binary file modified img/sample2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"manifest_version": 3,
"name": "Medium parser",
"version": "1.3.2",
"version": "1.4.0",
"description": "Unlocks the whole medium article on the go.",
"icons": {
"16": "img/icon16.jpg",
Expand Down

0 comments on commit 1d521a3

Please sign in to comment.