Skip to content

Instantly share code, notes, and snippets.

@suuhm
Last active April 1, 2026 15:19
Show Gist options
  • Select an option

  • Save suuhm/71e8509c109b8f763a6fcb8cbe76e545 to your computer and use it in GitHub Desktop.

Select an option

Save suuhm/71e8509c109b8f763a6fcb8cbe76e545 to your computer and use it in GitHub Desktop.
archive.ph / archive.today Bookmarklet automatic redirect
// Archive.ph Redirect Bookmarklet - Archive current page
// (c) 2026 suuhm
//
// TEST: 1. Copy code → New Bookmark → Name: "Archive.ph"
// 2. Go to any website → Click bookmark → Confirm dialog appears
// 3. Click OK → Redirects to archive.ph with full URL preserved
//
// OR: In Browser press F12 -> DEV JS Console
javascript:(function(){
var full = window.location.href;
// or archive.today / archive.is ...
var newUrl = "https://archive.ph/" + full;
if(confirm("🖥️ Archive.ph Redirect\n\n🔗 Original: " + full + "\n➡️ Target: " + newUrl + "\n\n🔥 Continue?")){
var a = document.createElement("a");
a.href = newUrl;
a.rel = "noreferrer";
a.target = "_self";
a.click();
}
})();
javascript:(function()%7Bvar%20full%3Dwindow.location.href%3Bvar%20newUrl%3D%22https%3A%2F%2Farchive.ph%2F%22%2Bfull%3Bif(confirm(%22%F0%9F%96%A5%EF%B8%8F%20Archive.ph%20Redirect%5Cn%5Cn%F0%9F%94%97%20Original%3A%20%22%2Bfull%2B%22%5Cn%E2%9E%A1%EF%B8%8F%20Target%3A%20%22%2BnewUrl%2B%22%5Cn%5Cn%F0%9F%94%A5%20Continue%3F%22))%7Bvar%20a%3Ddocument.createElement(%22a%22)%3Ba.href%3DnewUrl%3Ba.rel%3D%22noreferrer%22%3Ba.target%3D%22_self%22%3Ba.click()%3B%7D%7D)()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment