    fetch(versionsUrl)
        .then(response => {
            if (!response.ok) {
                throw new Error(`Failed to fetch ${versionsUrl}: ${response.statusText}`);
            }
            return response.text();
        })
        .then(scriptContent => {
            // Use a regular expression to find the DOC_VERSIONS array
            const regex = /var DOC_VERSIONS = (\[.*?\]);/s;
            const match = scriptContent.match(regex);

            if (match && match[1]) {
                // Re