{
button.addEventListener('click', function() {
// Get the URL from the button's data-url attribute
const postUrl = this.getAttribute('data-url');
// Create a temporary input element
const tempInput = document.createElement('input');
tempInput.value = postUrl;
// Append the input to the document
document.body.appendChild(tempInput);
// Select the text in the input
tempInput.select();
// Copy the selected text to the clipboard
document.execCommand('copy');
// Remove the input from the document
document.body.removeChild(tempInput);
});
});