QBO Automatic Classic Reports

Switch to classic reports on QBO page load.

// ==UserScript==
// @name         QBO Automatic Classic Reports
// @namespace    http://tampermonkey.net/
// @version      2025-06-23
// @description  Switch to classic reports on QBO page load.
// @author       You
// @match        https://qbo.intuit.com/*
// @icon         data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
// @grant        none
// @license MIT
// ==/UserScript==

(function() {
    'use strict';

    const clickButton = () => {
        const button = document.querySelector('.idsF.qbdsLinkActionButton.LinkActionButton-button-66c8d46.LinkActionButton-right-325b00e.medium');
        if (button && !button.hasAttribute('data-clicked')) {
            button.setAttribute('data-clicked', 'true');
            button.click();
        }
    };

    // Initial check in case the button is already there
    clickButton();

    // Observe any changes in the body to catch dynamic content
    const observer = new MutationObserver(() => {
        clickButton();
    });

    observer.observe(document.body, {
        childList: true,
        subtree: true
    });
})();