From 8913e2725efddceaf9b204c2b0d9d3b168fc2725 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 1/6] Support autoredirection This allows the user to pass in the arn as a url argument and be immediately redirected to it. --- index.html | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/index.html b/index.html index b1dbf7c..2b0d5ef 100644 --- a/index.html +++ b/index.html @@ -63,6 +63,18 @@

link2aws.github.io

//document.getElementById("text").value = "arn:aws:iam::aws:policy/AdministratorAccess"; onUpdate(); + + // If the user passes in the arn as a parameter, immediately redirect them + var params = new URLSearchParams(window.location.search); + var arn = params.get('arn'); + if (arn) { + elem.value = arn; + onUpdate(); + var a = document.getElementById('link'); + if (a) { + location.href = a.innerText; + } + }; } function onUpdate() { @@ -101,4 +113,4 @@

link2aws.github.io

- \ No newline at end of file + From 43bef8196d855860c0c7cd5654826e955886ccf3 Mon Sep 17 00:00:00 2001 From: Jeff-SearchPilot <138439698+Jeff-SearchPilot@users.noreply.github.com> Date: Mon, 8 Apr 2024 08:29:15 +0100 Subject: [PATCH 2/6] Use window.location.hash for autoredirects --- index.html | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/index.html b/index.html index 2b0d5ef..e87f06f 100644 --- a/index.html +++ b/index.html @@ -64,9 +64,8 @@

link2aws.github.io

//document.getElementById("text").value = "arn:aws:iam::aws:policy/AdministratorAccess"; onUpdate(); - // If the user passes in the arn as a parameter, immediately redirect them - var params = new URLSearchParams(window.location.search); - var arn = params.get('arn'); + // 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(); @@ -112,5 +111,4 @@

link2aws.github.io

onLoad(); - From e8fd078b06acdc97ff653e8f7d577a755ef85239 Mon Sep 17 00:00:00 2001 From: Jeff-SearchPilot <138439698+Jeff-SearchPilot@users.noreply.github.com> Date: Mon, 8 Apr 2024 08:31:32 +0100 Subject: [PATCH 3/6] Update index.html --- index.html | 1 + 1 file changed, 1 insertion(+) diff --git a/index.html b/index.html index e87f06f..99deb7c 100644 --- a/index.html +++ b/index.html @@ -111,4 +111,5 @@

link2aws.github.io

onLoad(); + From 8c55a1f561907ce283f99b7fa5986979cf310c78 Mon Sep 17 00:00:00 2001 From: Jeff-SearchPilot <138439698+Jeff-SearchPilot@users.noreply.github.com> Date: Mon, 8 Apr 2024 08:32:40 +0100 Subject: [PATCH 4/6] Update index.html From 2bff12661758449ed76f10dfef0bb736adca6a7f Mon Sep 17 00:00:00 2001 From: Jeff-SearchPilot <138439698+Jeff-SearchPilot@users.noreply.github.com> Date: Mon, 8 Apr 2024 08:34:02 +0100 Subject: [PATCH 5/6] Update index.html From 35b01cc3c41fba99003189c09cc152e34694a931 Mon Sep 17 00:00:00 2001 From: Jeff Sault Date: Mon, 8 Apr 2024 08:35:32 +0100 Subject: [PATCH 6/6] fix whitespace --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index 99deb7c..816400f 100644 --- a/index.html +++ b/index.html @@ -112,4 +112,4 @@

link2aws.github.io

- + \ No newline at end of file