Skip to content

Instantly share code, notes, and snippets.

@mizchi
Created May 13, 2025 07:56
Show Gist options
  • Save mizchi/87d9c66ed20584bd3eed6989940c92dc to your computer and use it in GitHub Desktop.
Save mizchi/87d9c66ed20584bd3eed6989940c92dc to your computer and use it in GitHub Desktop.
javascript:(function() {
let url = window.location.href;
let match = url.match(/arxiv\.org\/abs\/(\d+\.\d+)/);
if (match && match[1]) {
let paperId = match[1];
let ar5ivUrl = `https://ar5iv.labs.arxiv.org/html/${paperId}`;
window.location.href = ar5ivUrl;
} else {
alert("This doesn't appear to be an arXiv paper page. Please use this bookmarklet on an arXiv paper page (e.g., https://arxiv.org/abs/2402.09171)");
}
})();
@mizchi
Copy link
Author

mizchi commented May 13, 2025

one liner

javascript:window.location.href=window.location.href.replace(/arxiv\.org\/abs\/(\d+\.\d+)/, "ar5iv.labs.arxiv.org/html/$1");

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment