document.addEventListener('DOMContentLoaded', () => { const currentURL = window.location.href; const pageTitle = document.title; const twitterShareButton = document.querySelector('.twitter-share-button'); twitterShareButton.href = `https://twitter.com/intent/tweet?url=${currentURL}&text=${pageTitle}`; });