oaded', function() {
        let lastCertId = null;
        let lastCertTimestamp = null;

        {% if monitored_certs|length > 0 %}
            lastCertId = {{ monitored_certs[-1].id }};
            lastCertTimestamp = "{{ monitored_certs[-1].timestamp.isoformat() }}";
        {% endif %}

        const loadMoreCertsButton = document.getElementById('load-more-certs');
        if (loadMoreCertsButton) {
            loadMoreCertsButton.addEventListener('click', function() {
                loadMoreCertific