fetch('https://cors-anywhere.herokuapp.com/https://www.wanderingbuf.com/news?format=rss') .then(response => response.text()) .then(str => new window.DOMParser().parseFromString(str, "text/xml")) .then(data => { const latestArticle = data.querySelector("item link").textContent; window.location.href = latestArticle; // Redirect to the latest article }) .catch(error => console.error('Error fetching RSS feed:', error));