Preview:
// Add delete buttons below div.markdown elements
        const markdownDivs = document.querySelectorAll('.group');

        markdownDivs.forEach((div, index) => {
            const deleteButton = document.createElement('button');
            deleteButton.textContent = 'Delete';
            deleteButton.classList.add('delete-button');
            deleteButton.addEventListener('click', () => {
                // Remove the corresponding div when the delete button is clicked
                div.remove();
            });

            // Append the delete button to the div
            div.appendChild(deleteButton);
        });
downloadDownload PNG downloadDownload JPEG downloadDownload SVG

Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!

Click to optimize width for Twitter