Better World Bookmarklet
This is a little bookmarklet (a script you can run from your bookmarks bar) that I wrote to take you from an Amazon page to searching the product title on a different website in one click. It was originally just for Better World Books (hence the name), but I also made ones for Bookshop.org and eBay.
You can add them to your bookmarks bar by dragging the links from the list below into your bookmarks bar, or by right-clicking on them and selecting "add bookmark".
Source code
Amazon to Better World Books
javascript: (() => {
const book = encodeURIComponent(document.getElementById('productTitle').innerHTML);
document.location = 'https://www.betterworldbooks.com/search/results?q='+book+'';
})();
Amazon to Bookshop.org
javascript: (() => {
const book = encodeURIComponent(document.getElementById('productTitle').innerHTML);
document.location = 'https://bookshop.org/search?keywords='+book+'';
})();
Amazon to eBay
javascript: (() => {
const book = encodeURIComponent(document.getElementById('productTitle').innerHTML);
document.location = 'https://www.ebay.com/sch/i.html?_nkw='+book+'&_sacat=0';
})();
Credits and author's note
I learned what I needed to know to make these from freeCodeCamp's "What are Bookmarklets?" article, "Is there a way to pass JavaScript variables in URL?" on Stack Overflow, and a little bit of MDN Web Docs. Thank you!
Thanks to Cancel Prime for their big list of Amazon alternatives. Without it, I wouldn't even have heard of Better World Books, let alone have made these bookmarklets!
If you are a member of tilde.town and have suggestions for how I can improve these bookmarklets, please email me at lu@tilde.town. Unfortunately I do not currently have a way of receiving emails from outside of tilde.town.