diff --git a/examples/polyfill_io-replace/public/assets/main.js b/examples/polyfill_io-replace/public/assets/main.js index 53ba1680c..20642abf1 100644 --- a/examples/polyfill_io-replace/public/assets/main.js +++ b/examples/polyfill_io-replace/public/assets/main.js @@ -7,17 +7,10 @@ document.addEventListener('DOMContentLoaded', (event) => { codeBlock.className = 'code-block bg-gray-900 text-gray-100 p-4 rounded mt-4 overflow-x-auto text-sm'; - const explanationParagraph = document.createElement('p'); - explanationParagraph.className = 'mt-4 text-base text-gray-600'; - explanationParagraph.textContent = - 'The code block below shows the current HTML document source after the edge function has processed it:'; - const lastParagraph = document.querySelector('body p:last-of-type'); if (lastParagraph) { - lastParagraph.insertAdjacentElement('afterend', explanationParagraph); - explanationParagraph.insertAdjacentElement('afterend', codeBlock); + lastParagraph.insertAdjacentElement('afterend', codeBlock); } else { - document.body.appendChild(explanationParagraph); document.body.appendChild(codeBlock); } diff --git a/examples/polyfill_io-replace/public/polyfill.io.html b/examples/polyfill_io-replace/public/polyfill.io.html index 73a38b5ba..8c952c664 100644 --- a/examples/polyfill_io-replace/public/polyfill.io.html +++ b/examples/polyfill_io-replace/public/polyfill.io.html @@ -4,6 +4,13 @@ Sample Page with Polyfill.io + + + + + + + Hello, World!

This page uses an edge function to replace script references from polyfill.io to cdnjs.cloudflare.com for enhanced security and - performance. + performance. The code block below shows the current HTML document source + after the edge function has processed it. + View the original source code.

- - - - -