Get started with postscribe CDN

MIT licensed

Postscribe is a lightweight library for adding or modifying content after the document has been loaded.

Tags:
  • document.write
  • tag writer
  • asynchronous
  • javascript
  • after load

Stable version

Copied!

How to start using postscribe CDN


<!DOCTYPE html>
<html>
<head>
    <title>Get started with postscribe CDN - cdnhub.io</title>
    <script src="https://cdn.cdnhub.io/postscribe/2.0.8/postscribe.min.js"></script>
</head>
<body>
    <div id="targetElement">
        <p id="textToBeModified">Hello, this is some text.</p>
    </div>

    <script>
        // Wait for the library to load
        window.onload = function() {
            const targetElement = document.getElementById('targetElement');
            const textToBeModified = document.getElementById('textToBeModified');

            // Use postscribe to modify the text
            postscribe(targetElement, {
                html: `<span style="color: red;">This text has been modified.</span>`,
                selector: '#textToBeModified'
            });
        };
    </script>
</body>
</html>
Copied!
Copied!
Copied!
Copied!

All versions