Skip to content

Instantly share code, notes, and snippets.

@mica
Last active January 29, 2026 11:51
Show Gist options
  • Select an option

  • Save mica/bc8a1ba94f249c6ab839a614ea9daab6 to your computer and use it in GitHub Desktop.

Select an option

Save mica/bc8a1ba94f249c6ab839a614ea9daab6 to your computer and use it in GitHub Desktop.
Archive.today bookmarklet for bypassing article paywalls. Get it here: https://bookmarkl.ink/mica/bc8a1ba94f249c6ab839a614ea9daab6
//bookmarklet_title: Open on Archive.today
//bookmarklet_about: Bypass any paywall by clicking this bookmarklet from the article
let xhr = new XMLHttpRequest();
xhr.open('get', 'https://archive.ph/' + location.origin + location.pathname);
xhr.responseType = 'document';
xhr.onload = () => {
if (xhr.response.querySelector('#CONTENT').innerText.includes('No results')) {
location.href = 'https://archive.ph/' + location.origin + location.pathname
} else {
location.href = xhr.response.querySelector('.TEXT-BLOCK > a').href;
}
}
xhr.send();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment