From 20e0dec89bdab318cbcfa193f52ff40fc40b1a66 Mon Sep 17 00:00:00 2001 From: Jeff-SearchPilot <138439698+Jeff-SearchPilot@users.noreply.github.com> Date: Tue, 19 Mar 2024 11:13:41 +0000 Subject: [PATCH] Support autoredirection This allows the user to pass in the arn as a url argument and be immediately redirected to it. --- index.html | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/index.html b/index.html index b1dbf7c..816400f 100644 --- a/index.html +++ b/index.html @@ -63,6 +63,17 @@

link2aws.github.io

//document.getElementById("text").value = "arn:aws:iam::aws:policy/AdministratorAccess"; onUpdate(); + + // If the user passes in the arn as a anchor, immediately redirect them + var arn = window.location.hash.replace('#', ''); + if (arn) { + elem.value = arn; + onUpdate(); + var a = document.getElementById('link'); + if (a) { + location.href = a.innerText; + } + }; } function onUpdate() {