Untitled

mail@pastecode.io avatar
unknown
plain_text
13 days ago
620 B
2
Indexable
Never
<script>
document.addEventListener('DOMContentLoaded', function() {
    // Assuming the message has a specific class or ID, e.g., "message"
    var messages = document.querySelectorAll('.message');
    messages.forEach(function(message) {
        var messageText = message.textContent;
        var link = message.querySelector('a');
        var href = link ? link.getAttribute('href') : '';

        if (messageText.includes('Export') && href && href.match(/\.csv$/)) {
            console.log('Message contains "Export" and CSV file found:', href);
            // Perform your logic here
        }
    });
});
</script>
Leave a Comment