Skip to content

Commit

Permalink
Support autoredirection
Browse files Browse the repository at this point in the history
This allows the user to pass in the arn as a url argument and be immediately redirected to it.
  • Loading branch information
Jeff-SearchPilot authored and fxkr committed Apr 8, 2024
1 parent 92f207f commit 20e0dec
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,17 @@ <h1>link2aws.github.io</h1>

//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() {
Expand Down

0 comments on commit 20e0dec

Please sign in to comment.