Add README and MIT license
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
parent
11d41d1be1
commit
f1cf418f63
3 changed files with 58 additions and 1 deletions
35
README.md
Normal file
35
README.md
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
# book-links
|
||||
|
||||
A Violentmonkey userscript that shows where else you can get a book while you're browsing one — Anna's Archive and Waterstones — as a small floating widget in the corner of the page.
|
||||
|
||||
## Install
|
||||
|
||||
1. Install [Violentmonkey](https://violentmonkey.github.io/) (Chrome, Firefox, Edge).
|
||||
2. Install the script from the raw file: [book-links.user.js](https://raw.githubusercontent.com/alexture/book-links/main/book-links.user.js) — Violentmonkey will prompt to install it.
|
||||
|
||||
The script auto-updates itself from this repo (via `@updateURL`), so you don't need to reinstall it when it changes.
|
||||
|
||||
## What it does
|
||||
|
||||
On a book page on Bookshop.org, Amazon (`.fr`/`.com`), or Waterstones, it:
|
||||
|
||||
1. Extracts the book's ISBN (from the URL or page content) and, as a fallback, title/author.
|
||||
2. Checks whether the book is available on:
|
||||
- **Waterstones** — skipped if you're already on Waterstones
|
||||
- **Anna's Archive**
|
||||
3. Shows a small widget in the bottom-right corner with a ✓ link if found, a ✗ if confirmed not found, or a `?` link if it couldn't be verified (e.g. JS-rendered search results) — closeable with the × button.
|
||||
|
||||
## Supported sites
|
||||
|
||||
- `bookshop.org/p/books/*`
|
||||
- `waterstones.com/book/*`
|
||||
- `amazon.fr` and `amazon.com` product pages (`/dp/*`)
|
||||
|
||||
## Notes
|
||||
|
||||
- Uses `GM_xmlhttpRequest` to query Anna's Archive and Waterstones directly from the page, bypassing CORS.
|
||||
- Availability checks are best-effort text matching against search results, not an official API — the `?` state means "couldn't confirm either way, here's the search link."
|
||||
|
||||
## License
|
||||
|
||||
MIT — see [LICENSE](LICENSE).
|
||||
Loading…
Add table
Add a link
Reference in a new issue