Last active
March 16, 2022 18:55
-
-
Save schlarpc/47b0413ab01272876344205ccdc51ea2 to your computer and use it in GitHub Desktop.
aws-logout.user.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name AWS Console Federation Autologout | |
// @match https://signin.aws.amazon.com/federation?* | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
let logout = document.querySelector('a[href^="/oauth?Action=logout"]'); | |
if (logout) { | |
let iframe = document.createElement("iframe"); | |
iframe.src = logout.href; | |
iframe.onload = iframe.onerror = function() { document.location.reload(); }; | |
iframe.style.display = 'none'; | |
document.body.appendChild(iframe); | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment