
Bookmarklets
You've found the Bookmarklets page! A bookmarklet is a bit like a bookmark, but it executes JavaScript instead of loading a webpage... Well... Sometimes that JavaScript loads a webpage, but you get the idea. To "install" or "add" a bookmarklet to your browser, drag and drop the link onto your favorites bar. Then to use it, simply click it. It's that easy. Unless otherwise noted, all code contained in the bookmarklets is my own work and is copyrighted under the MIT license.
Wayback Machine (Internet Archive)
Wayback ← Drag that link onto your favorites bar to use the bookmarklet.
The Wayback Machine is a site that catalogs web pages over time, allowing you to see previous versions of web pages that it has indexed.
This bookmarket will do one of two things. If you are on a webpage that isn't the wayback machine, it will take you to the most recent version of the page the Wayback Machine has in it's collection (If it exists). If you are on the Wayback Machine viewing a page, it will take you to the live version of that page.
Source Code
You can see the minified code by right-clicking the bookmarklet and selecting edit. Below is the source code:
((location) => {
const { hostname, pathname } = location;
if (hostname === 'web.archive.org') {
location.href = pathname.split(/\/web\/.*?\//)[1];
} else {
location.href = `https://web.archive.org/web/${hostname}${pathname}`;
}
})(window.location);