Auto AWS SSO CLI - Close Window

Close the tab when successful AWS SSO CLI login

2021-05-21 يوللانغان نەشرى. ئەڭ يېڭى نەشرىنى كۆرۈش.

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name        Auto AWS SSO CLI - Close Window
// @namespace   Violentmonkey Scripts
// @match       https://prodigy.awsapps.com/start/user-consent/login-success.html
// @grant       window.close
// @version     1.0
// @author      Nicholas Hawkes
// @description Close the tab when successful AWS SSO CLI login
// @homepage    https://gist.github.com/meagar/9c902cf83d464c0572ea8dd37a7faa00
// ==/UserScript==

setInterval(() => {
  // When the URL has changed to success, close the window
  if (location.href == "https://prodigy.awsapps.com/start/user-consent/login-success.html") {
    window.close()
  }
}, 1000)