https://github.com/remy/read-body
A simple site to pull the body of the post out and reformat for readability
https://github.com/remy/read-body
javascript readability
Last synced: 6 months ago
JSON representation
A simple site to pull the body of the post out and reformat for readability
- Host: GitHub
- URL: https://github.com/remy/read-body
- Owner: remy
- Created: 2017-02-05T11:40:24.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-10-27T09:09:11.000Z (almost 7 years ago)
- Last Synced: 2025-03-19T01:59:49.559Z (7 months ago)
- Topics: javascript, readability
- Language: JavaScript
- Homepage: https://read.isthe.link
- Size: 27.3 KB
- Stars: 45
- Watchers: 5
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# read.isthe.link
A basic functionality readability almost-clone. This service will *try* to search for the body of the content to a URL, and represent it stripped back and with minimal styling.
## Usage
Send your URL to https://read.isthe.link via a query string, and so long as the URL is publically available (i.e. not behind login), then the page can be re-rendered:
https://read.isthe.link?url=https://remysharp.com/node
The page will be cached for a period of time, so subsequent requests will be faster.
## Usage with private URLs
You can `POST` a `body` to the service and it will give you a hashed URL to redirect to. For example:
```js
const xhr = new XMLHttpRequest();xhr.open('POST', 'https://read.isthe.link');
xhr.setRequestHeader('content-type', 'application/x-www-form-urlencoded');
xhr.setRequestHeader('referrer', window.location);xhr.onload = () => {
const res = JSON.parse(xhr.response);
window.location = `https://read.isthe.link?url=${res.url}`;
}xhr.send(`body=${encodeURIComponent(document.documentElement.innerHTML)}`);
```## Issues & feedback
All feedback, suggestions, pull requests to github (please): https://github.com/remy/read-body
[MIT Licensed](https://rem.mit-license.org)