Offline Notepad View raw

Shared snapshot

VCs38ylO1A0x0lFOpzQE

now iframe: https://offlinenotepad.com/vcs38ylo1a0x0lfopzqe https://www.Literallyanything.io/app/vcs38ylo1a0x0lfopzqe https://www.Literallyanything.io/iterate?id=vcs38ylo1a0x0lfopzqe Redo this more Offline notepad private virtual dashboard:

    document.getElementById('deleteBtn').addEventListener('click', function() {
        document.getElementById('iframeSection').innerHTML = '';
    });

    document.getElementById('cloneBtn').addEventListener('click', function() {
        const urlInput = document.getElementById('iframeUrl');
        const url = urlInput.value || 'https://Offlinenotepad.com/VCs38ylO1A0x0lFOpzQE';
        urlInput.value = ''; // Clear input after use
        iframeUrls.push(url);
        addIframe(url);
    });

    document.getElementById('prevArrow').addEventListener('click', function() {
        currentIframeIndex = (currentIframeIndex > 0) ? currentIframeIndex - 1 : iframeUrls.length - 1;
        updateIframe();
    });

    document.getElementById('nextArrow').addEventListener('click', function() {
        currentIframeIndex = (currentIframeIndex < iframeUrls.length - 1) ? currentIframeIndex + 1 : 0;
        updateIframe();
    });

    document.getElementById('expandBtn').addEventListener('click', function() {
        const container = document.getElementById('iframeContainer');
        if (container.style.position === 'fixed') {
            container.style.position = 'relative';
            container.style.width = '';
            container.style.height = '';
            container.style.top = '';
            container.style.left = '';
            container.style.paddingBottom = '56.25%';
        } else {
            container.style.position = 'fixed';
            container.style.width = '90%';
            container.style.height = '90%';
            container.style.paddingBottom = '0';
            container.style.top = '5%';
            container.style.left = '5%';
        }
    });

    function addIframe(url) {
        const newIframe = `
            <div class="iframe-container" id="iframeContainer">
                <iframe src="${url}" frameborder="0"></iframe>
                <div class="expand-button" id="expandBtn">⇲</div>
            </div>
        `;
        document.getElementById('iframeSection').insertAdjacentHTML('beforeend', newIframe);
    }

    function updateIframe() {
        const iframeContainer = document.getElementById('iframeContainer');
        iframeContainer.querySelector('iframe').src = iframeUrls[currentIframeIndex];
    }
</script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/js/bootstrap.min.js"></script>