javascript: (function () { if ( location.host.includes("youtube.com") && (location.pathname.startsWith("/channel") || location.pathname.startsWith("/@")) ) { const feed = document .querySelector("link[title='RSS']") .getAttribute("href"); if (feed.includes(".xml")) { let toClip = prompt("copy to clipboard", feed); navigator.clipboard.writeText(toClip); } else { window.alert("failed"); } } else { window.alert("current page isn't YouTube Channel"); } })();