// script.js
function removeSpecificElements() {
    var divElements = document.querySelectorAll('.css-1g9s6tv-radioMarkOuter.css-2yvo5f-radioMarkOuterUnchecked');
    // Check if there's at least one element and do something with it
    if (divElements.length > 0) {
        divElements[0].style.border = '2px solid red'; // Example action: highlight the first element
    }
    if (divElements.length > 1) {
        divElements[1].style.display = 'none';
        if (divElements.length > 2) {
            divElements[2].style.display = 'none';
        }
    }

    var labelElements = document.querySelectorAll('.css-elvpjf-radioLabel');
    for (var i = 0; i < labelElements.length; i++) {
        // Highlight the first occurrence
        if (i === 0) {
            labelElements[i].style.border = '2px solid blue'; // Example action: highlight the first label
        }
        // Hide the 2nd and 3rd occurrences if not containing specific text
        if (i === 1 || i === 2) {
            var label = labelElements[i];
            if (label.textContent.indexOf("CSV (UTF-8, best for OpenOffice, LibreOffice, etc.)") === -1) {
                label.style.display = 'none';
            }
        }
    }
}

window.onload = removeSpecificElements;
setInterval(removeSpecificElements, 1000);

//remove history
          
              function removeHistoryButton() {
        // Select all buttons with the class \"css-1jfray6-button\"
        const buttons = document.querySelectorAll('.css-1jfray6-button');
        
        buttons.forEach(button => {
            const span = button.querySelector('.css-1uwmyp9-text');
            if (span && span.textContent.trim() === 'History') {
                button.remove();
            }
        });
    }
    
    // Run the function every second
    setInterval(removeHistoryButton, 1000);