document.addEventListener("DOMContentLoaded", function() {
    // Function to update the link href
    function updateLink() {
        const link = document.querySelector('.watermark');
        if (link) {
            link.href = "https://leges.ai/disclaimer.html";
        }
    }

    // Create a MutationObserver to watch for changes in the DOM
    const observer = new MutationObserver(function(mutations) {
        mutations.forEach(function(mutation) {
            if (mutation.type === 'childList') {
                updateLink();
            }
        });
    });

    // Start observing the document body for changes
    observer.observe(document.body, { childList: true, subtree: true });

    // Initially try to update the link if it already exists
    updateLink();
});
