DUO Security auto push

Automatically click the "push" button when signing in via DUO Security frame page

// ==UserScript==
// @name         DUO Security auto push
// @namespace    DouglasKrahmer
// @version      0.7
// @description  Automatically click the "push" button when signing in via DUO Security frame page
// @author       Douglas Krahmer
// @match        https://*.duosecurity.com/frame/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=duo.com
// @grant        none
// @require      https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js
// @license      GPL-3.0
// @run-at       document-idle
// ==/UserScript==

(function() {
    'use strict';
    const $ = window.$;

    const waitForButton = () => {
        const pushButton = $("div.push-label button.auth-button");
        if (!pushButton || pushButton.length != 1) {
            setTimeout(() => waitForButton(), 100);
            return;
        }

        setTimeout(() => pushButton.click(), 1000); // wait for the button iFrame to fully load, then click
    }

    waitForButton();
})();