Copy RSS Markup from current page
This is a quick and dirty tool to retrieve HTML markup identifying RSS feeds from the current page.
I've made this tool so you can retrieve feeds from your own bearblog to add to your home page and your Subscribe Page. (i.e. so IIIII can do this. I don't wanna go 'view source' and ctrl+f a hundred times, or even 2 times lol, but if you add more feeds and a subscribe page to your blog, then my work as an RSS evangelist is going well.)
Also See: Properly Support RSS on your Website and Please ask Steam to improve RSS Support
Sample Markup
This is what you're retrieving (though, we're only going to retrieve one type of feed, atom by default.)
<link rel="alternate" type="application/atom+xml" href="/feed/" title="ReedyBear's Blog">
<link rel="alternate" type="application/rss+xml" href="/feed/?type=rss" title="ReedyBear's Blog">
The Code
You'll copy+paste this as a URL for a bookmark. You click the bookmark and it copies the HTML markup into your clipboard, which you can then paste into any blog post, or you can add to your header & footer directives if you have premium Bear (Note: All bears are premium)
javascript:
type="atom"; /* you can change this to "rss" */
nodes = document.querySelectorAll('link[rel="alternate"][type="application/'+type+'+xml"');
markup = "";
for (const node of nodes){
markup += node.outerHTML.trim()+"\n";
}
navigator.clipboard.writeText(markup);