/*
<!-- _The very simple technology that Fortune 500 and Web Giants are jealously trying to oppress and hide from you. -- Alex James Anderson_ -->
> _The technology that Fortune 500 and Web Giants don't want you to know about. -- Alex James Anderson_
## 📰 View news feeds inside the browser
### _Render syndication web feeds_
This programs renders web feeds into readable and printable HTML file. It supports ActivityStream, Atom, JSON, RDF and RSS syndications.
If you are using LibreWolf, Waterfox, Firefox or SeaMonkey, please [follow instructions](#gecko) in order to make the best use of this program.
---
#### What is a Web Syndication News Feed?
Syndication Feed is a mean for content and media publishers to reach a wider audience easily. It allows you to receive information directly without the going from site to site.
Essentially, a feed is a function that allows “Feed Readers” to access multiple websites automatically looking for new content and then posting the information about new content and updates to another website, mobile app or desktop software at the office.
Feeds provide a way for users to keep up with the latest news, events, package and delivery status information posted on different websites such as news sites, music sites, content sites (i.e. social networks), torrent indexers and podcasts in one spot.
---
<!--
#### Preview of [The IFERS Forum](https://ifers.forumotion.com/?ref=org.openuserjs.sjehuda.newspaper) ([XML](https://ifers.forumotion.com/feed/?type=atom&ref=org.openuserjs.sjehuda.newspaper)) ([Static Preview](https://github.com/greasemonkey/greasemonkey/files/11321118/newspaper.pdf))
| Before | | After |
| ------- | --- | ------- |
| [<img src="https://user-images.githubusercontent.com/19249089/234231176-1fe660fb-46ce-4009-a167-341f7d6d1c99.png" alt="Before" title="This is how a web feed file really looks like, an XML."/>](https://user-images.githubusercontent.com/19249089/234231176-1fe660fb-46ce-4009-a167-341f7d6d1c99.png) | > | [<img src="https://user-images.githubusercontent.com/19249089/234228487-2351fc25-a84e-473c-b2cf-559c5db7145e.gif" alt="After" title="This is how a web feed looks like when using the Newspaper userscript."/>](https://user-images.githubusercontent.com/19249089/234228487-2351fc25-a84e-473c-b2cf-559c5db7145e.gif) |
#### More Samples
-->
#### [Gajim XMPP Client](https://gajim.org/?ref=org.openuserjs.sjehuda.newspaper) ([XML](https://gajim.org/index.xml?ref=org.openuserjs.sjehuda.newspaper)); view as [PNG](https://user-images.githubusercontent.com/19249089/167972159-54a4040c-b56f-46c1-a581-2c8d24930d93.jpeg) or [PDF](https://github.com/mastodon/mastodon/files/8674313/Gajim.pdf) (with images)
#### [BlackListed News](https://blacklistednews.com/?ref=org.openuserjs.sjehuda.newspaper) ([XML](https://blacklistednews.com/rss.php?ref=org.openuserjs.sjehuda.newspaper)); view as [PDF](https://github.com/yacy/yacy_search_server/files/11240710/blacklistednews.com.pdf) (text only)
<!-- [](https://github.com/yacy/yacy_search_server/files/11240710/blacklistednews.com.pdf) -->
---
#### Please visit our counterparts
#### Falkon Browser
#### [RSS Finder](https://store.falkon.org/p/1689113/)
Find RSS feeds on the website. This extension a button to toolbar and statusbar on which when you click the popup window with available feed will show up.
#### LibreWolf Browser
#### [Feed Preview](https://code.guido-berhoerster.org/addons/firefox-addons/feed-preview/)
Native handling of RSS and Atom feed reading using live bookmarks.
#### [Livemarks](https://addons.mozilla.org/en-US/firefox/addon/livemarks/)
Restore RSS Feed Livemarks in Firefox.
#### [rss.html](https://addons.mozilla.org/en-US/firefox/addon/rss-html/)
Renders some rss feeds as html.
#### [RSSPreview](https://github.com/aureliendavid/rsspreview#rsspreview)
Preview RSS feeds in the browser.
#### [Want My RSS](https://github.com/Reeywhaar/want-my-rss#-want-my-rss)
Restore some of RSS functionality which Firefox abandoned.
#### Chromium Browser
#### [Foxish](http://davidhampgonsalves.com/foxish/)
Indicate the availability of RSS or Atom feeds in the browser's URL bar and render a previews of feeds.
#### [The RSS Aggregator](https://chrome.google.com/webstore/detail/the-rss-aggregator/ffhafkagcdhnhamiaecajogjcfgienom)
RSS reader like in the Opera browser.
<!--
---
#### <span style='color:darkred;'> HELP WANTED </span> (CSS DESIGNER)
#### If you are good at CSS, you're more than welcome to help refining the [CSS stylesheet](https://openuserjs.org/scripts/sjehuda/Newspaper/issues/Improve_CSS) used by this Userscript.
#### Thank you!
-->
---
#### Upcoming changes:
* ToC: Toggle button/link;
* ToC: Auto collaps when length exceeds N entries;
* Provident Media Load "Lazy" (so-called) content media loader;
* Load stylesheet upon error of existing stylesheet (i.e. 404 etc.).
<!--
### Done Tasks
#### XSLT
* Atom support;
* RDF support;
* RSS support;
* Set maximum amount entries to display;
* Table of contents.
#### CSS
* Newspaper style.
#### JS
* Subresource Integrity (SRI);
* Use DOMParser to parse XML;
* Migrate to ~~[XSLT-processor](https://github.com/fiduswriter/xslt-processor) or [SaxonJS](https://www.saxonica.com/saxon-js/index.xml) or to~~ any other XSLT processor, because some web browsers provide broken XSLT processors built-in (shenanigans resulted by pressure from the advertising industry to oppress RSS);
* Help button;
* Respect existing stylesheets;
* SubToMe button;
* JSON support;
* First check HEADER, then GET content [@7nik](https://openuserjs.org/scripts/sjehuda/Newspaper/issues/First_check_HEADER,_then_GET_content).
-->
<!--
### Please visit out counterparts
[FeedPress](https://feedpress.me/) (Online Service)
FeedPress manage your podcast hosting and keep watching your podcast and RSS feed stats in single web application FeedPress also styling your Feeds into a readable HTML page with a slick design.
-->
---
#### <img src="https://raw.githubusercontent.com/KDE/falkon/master/logo.png" height="26" alt="Falkon" title="Download Falkon Browser"/> Designed for <span style='color:MediumPurple'>[Falkon](https://www.falkon.org/?ref=org.openuserjs.sjehuda.newspaper)</span><!--  -->
#### <img src="https://raw.githubusercontent.com/midori-browser/core/master/icons/scalable/apps/org.midori_browser.Midori.svg" height="26" alt="Midori Browser" title="Download Midori Browser"/> Designed for <span style='color:DarkGreen'>[Midori](https://github.com/midori-browser/core)
#### <img src="https://raw.githubusercontent.com/OtterBrowser/otter-browser/8b5ac96c1d36a1ffee6828969514a4f2745c88be/resources/icons/otter-browser.svg" height="26" alt="Otter Browser" title="Download Otter Browser"/> Designed for <span style='color:DeepSkyBlue'>[Otter](https://otter-browser.org/?ref=org.openuserjs.sjehuda.newspaper)
#### <!-- img src="https://www.qt.io/hubfs/qt-design-system/assets/logos/qt-logo.svg?ref=org.openuserjs.sjehuda.newspaper" width="26" alt="QtWebEngine" title="Support QtWebEngine"/> Designed for <span style='color:MediumPurple'>[QtWebEngine](https://wiki.qt.io/QtWebEngine?ref=org.openuserjs.sjehuda.newspaper)</span -->
---
#### Gecko
#### Enable JSON
- Navigate to `about:config`.
- Set `devtools.jsonview.enabled` to `false`.
#### Enable Atom & RSS
- Install [Open in Browser](https://addons.mozilla.org/firefox/addon/open-in-browser/)
- Import the following rules via extension preferences.
```json
{
"mime-mappings": {
"application/atom+xml": "1text/plain",
"application/rss+xml": "1text/plain",
"application/feed+json": "1text/plain"
},
"sniffed-mime-mappings": {},
"text-nosniff": false,
"octet-sniff-mime": true,
"override-download-type": false
}
```
---
### Member of <span style='color:orange'>[RSS Task Force](http://rss.task.force)</span>
*/
// ==UserScript==
// @name Newspaper (Native RSS Reader)
// @namespace i2p.schimon.newspaper
// @description Native Feed Viewer. Render syndication web feeds (supports ActivityStreams, Atom, JSON, RDF and RSS)
// @author Schimon Jehudah
// @collaborator CY Fung
// @collaborator NotYou
// @homepageURL https://sjehuda.github.io/newspaper.html
// @supportURL https://greasyfork.org/en/scripts/465932-newspaper/feedback
// @copyright 2023, Schimon Jehudah (http://schimon.i2p)
// @license MIT; https://opensource.org/licenses/MIT
// @icon data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMDAgMTAwIj48dGV4dCB5PSIuOWVtIiBmb250LXNpemU9IjkwIj7wn5OwPC90ZXh0Pjwvc3ZnPgo=
// @exclude *?streamburner=0
// @exclude *?*streamburner=0
// @match *://*/*
// @version 23.06.10
// @run-at document-start
// @grant GM.setValue
// @grant GM.getValue
// ==/UserScript==
// ==GreasyFork==
// @author Schimon Jehudah
// @collaborator CY Fung
// @collaborator NotYou
// ==/GreasyFork==
//window.addEventListener("securitypolicyviolation", (e) => {
// console.info(e.originalPolicy);
//}, { passive : true, });
/*
NOTE
RDF
https://web.archive.org/web/20070504072733/http://www.svg.org/feeds/725.rss
https://web.archive.org/web/20070402123623if_/http://blogs.forum.nokia.com/rss_entry_feed.rss
OPML
http://opml.org/?format=opml
SML
https://www.pclinuxos.com/forum/index.php?action=.xml
https://simplemachines.org/
TODO
0) Skim pages (10 entries per page)
1) Handle media load
** https://www.techrepublic.com/article/preloading-and-the-javascript-image-object/ **
https://www.merixstudio.com/blog/lazy-loading-pure-javascript/
https://css-tricks.com/the-complete-guide-to-lazy-loading-images/
2) Dark mode
body { color: WhiteSmoke; background: #333; }
a { color: WhiteSmoke; }
#top-navigation-button { background: '#555'; border: '2px solid WhiteSmoke'; }
Example: https://alligator.io/feed.xml (Color schemes)
Note: Waiting for Falkon https://bugs.kde.org/show_bug.cgi?id=468046
3) Support OPML http://opml.org/?format=opml
Support SML https://www.pclinuxos.com/forum/index.php?action=.xml
4) Use JSON to store and apply inline CSS style per element
5) Replace <xsl:text>#newspaper-oujs-</xsl:text> by <xsl:text>#</xsl:text><xsl:value-of select="title"/>
6) Add instructions to
navigator.userAgent.toLowerCase().includes('firefox')
https://openuserjs.org/scripts/sjehuda/Newspaper#gecko
NOTE
1) <p class="explanation">This is a podcast RSS feed generated by <a href="https://castos.com/seriously-simple-podcasting/">Seriously Simple Podcasting</a>. It is meant for consumption by podcast feed readers using the URL in the address bar.</p>
Design HTML as JSON
NOTE Handling attributes
"attributes": {
"style" : {
"direction" : "language"
}
}
feedItems = {
"div": "feed",
"attributes": {
"style" : "language",
},
"children" : {
"div": "title",
"div": "subtitle",
"div": "links-bar",
"div": "entry", // multiple alike
"attributes": {
"style" : "language",
},
"children" : {
"div" : "title",
"attributes": {
"href" : ["url", "id"],
"id" : "id",
},
"div" : ["authors", "author"],
"div" : ["date_published", "date_modified"],
"div" : ["content_html", "content_text"],
"div" : "image",
"div" : "tags",
},
}
};
FIXME
1) Event listeners don't work on every page, yet.
This is due to document.contentType (read only) determined as xml (Mainstream issue)
2) https://imslp.org/wiki/Special:IMSLPRecordingsFeed/atom
https://artemislena.eu/feed.json
*/
const
namespace = 'i2p.schimon.newspaper',
defaultTitle = 'Streamburner',
// This news feed is brought to you by Streamburner News Reader
defaultSubtitle = 'News feed rendered by Streamburner',
rtlLocales = ['ar', 'fa', 'he', 'ji', 'ku', 'ur', 'yi'],
atomRules = {
"feedLanguage" : "feed", // NOTE @xml:lang
"feedTitlePage" : "feed > title",
"feedSubtitle" : "feed > subtitle",
"feedDate" : "updated",
"feedItem" : "entry",
"feedItemTitle" : "title",
"feedItemLink" : "link", // NOTE varies and doesn't always contain rel='alternate'
"feedItemDate" : "updated",
"feedItemContent" : "content",
"feedItemSummary" : "summary",
"feedItemEnclosure" : "link[rel='enclosure']"
},
rdfRules = {
"feedLanguage" : "channel > language", // TODO Test
"feedTitlePage" : "channel > title",
"feedSubtitle" : "channel > description",
"feedDate" : "date",
"feedItem" : "item",
"feedItemTitle" : "title",
"feedItemLink" : "link",
"feedItemDate" : "date",
"feedItemContent" : "description",
"feedItemEnclosure" : "resource" // TODO Test
},
rssRules = {
"feedLanguage" : "channel > language",
"feedTitlePage" : "channel > title",
"feedSubtitle" : "channel > description",
"feedDate" : "lastBuildDate",
"feedItem" : "item",
"feedItemTitle" : "title",
"feedItemLink" : "link",
"feedItemDate" : "pubDate",
"feedItemContent" : "description",
"feedItemEnclosure" : "enclosure"
},
banner =`<svg width="256" height="100" xmlns="http://www.w3.org/2000/svg"><defs><linearGradient x1="77.1180071%" y1="12.3268731%" x2="3.36110907%" y2="118.781335%" id="a"><stop stop-color="#D446FF" offset="0%"/><stop stop-color="#A0D8FF" offset="100%"/></linearGradient><linearGradient x1="50.7818321%" y1="-17.173918%" x2="76.3448843%" y2="77.2144178%" id="b"><stop stop-color="#3C3C3C" offset="0%"/><stop stop-color="#191919" offset="100%"/></linearGradient><linearGradient x1="148.794275%" y1="-26.5643443%" x2="-21.1415871%" y2="99.3029307%" id="c"><stop stop-color="#D446FF" offset="0%"/><stop stop-color="#A0D8FF" offset="100%"/></linearGradient><linearGradient x1="41.8083357%" y1="20.866645%" x2="95.5956597%" y2="-8.31097281%" id="d"><stop stop-color="#FFF" offset="0%"/><stop stop-color="#DADADA" offset="100%"/></linearGradient><linearGradient x1="52.2801818%" y1="70.5577815%" x2="2.53678786%" y2="8.97706744%" id="e"><stop stop-color="#FFF" offset="0%"/><stop stop-color="#DADADA" offset="100%"/></linearGradient><linearGradient x1="98.684398%" y1="12.9995489%" x2="35.2678133%" y2="40.863838%" id="f"><stop stop-color="#D0D0D0" offset="0%"/><stop stop-color="#FFF" offset="100%"/></linearGradient><linearGradient x1="34.2841787%" y1="31.6476155%" x2="-40.2132134%" y2="123.398162%" id="g"><stop stop-color="#FFDC68" offset="0%"/><stop stop-color="#CE4300" offset="100%"/></linearGradient><linearGradient x1="95.7086811%" y1="2.33776624%" x2="-10.5474304%" y2="34.7418529%" id="h"><stop stop-color="#FFDC68" offset="0%"/><stop stop-color="#CE4300" offset="100%"/></linearGradient><linearGradient x1="55.2222258%" y1="39.6484627%" x2="-63.5655829%" y2="222.055577%" id="i"><stop stop-color="#FFDC68" offset="0%"/><stop stop-color="#CE4300" offset="100%"/></linearGradient></defs><g fill="none" fill-rule="evenodd"><path fill="#252525" fill-rule="nonzero" d="M68.3766216 33.24450169V46.6414437h17.1215335v4.3309176H68.3766216v18.9693703h-4.9083597V28.91359256h23.7622535v4.33090913H68.3766216zm31.2822046-4.92645583h5.5724368L119.81199 69.3461849h-4.966111l-4.157673-11.9244357H93.7687843l-4.1576731 11.9244357H85.078099l14.5807272-41.02813904Zm2.5696738 4.7928662L95.241299 53.1197155h13.945526L102.2285 33.11091206Zm20.879509-4.1973195h4.90836V65.6397065h18.420795v4.3020251h-23.329155zm27.650382 0h4.908369V69.9417316h-4.908369zm48.41257-.4253905c2.714031 0 5.245206.48121024 7.593526 1.44363071 2.367565.9431758 4.407905 2.28094667 6.121021 4.01331259 1.732366 1.73235454 3.089381 3.89780774 4.071046 6.49635944.981671 2.5792957 1.472507 5.4184455 1.472507 8.5174493 0 4.1961709-.837308 7.9303791-2.511923 11.2026246-1.655364 3.2529952-3.965184 5.7745455-6.929458 7.5646511-2.945012 1.770861-6.284623 2.6562914-10.018831 2.6562914-2.463811 0-4.82175-.43309-7.073818-1.2992702-2.252074-.8854361-4.282792-2.1654616-6.092154-3.8400765-1.80935-1.6746149-3.252981-3.8593184-4.330892-6.5541105-1.077922-2.7140367-1.616884-5.7649203-1.616884-9.1526508 0-3.1759995.490836-6.0825226 1.472507-8.7195693.981676-2.6370411 2.329072-4.8506144 4.042188-6.64072001 1.713115-1.8093616 3.753455-3.20487781 6.12102-4.18654862 2.367559-1.00091547 4.927607-1.50137321 7.680145-1.50137321Zm-.259854 4.30203363c-1.751611 0-3.435857.32722172-5.052738.98166514-1.616863.65445477-3.108617 1.61688087-4.475261 2.88727847-1.347399 1.2511471-2.434941 2.9450124-3.262626 5.0815957-.808429 2.117333-1.212643 4.5137703-1.212643 7.1893121 0 2.560051.375344 4.9276129 1.126034 7.1026855.750689 2.1558337 1.770858 3.9651924 3.060506 5.4280763 1.289648 1.4628896 2.810277 2.5985489 4.561887 3.406978 1.770867.8084405 3.666844 1.2126607 5.687931 1.2126607 1.366643 0 2.704411-.2021115 4.013304-.6063346 1.328148-.4042174 2.598552-1.0394161 3.811209-1.9055963 1.212647-.8854361 2.271313-1.9633529 3.176-3.2337505.923925-1.2703975 1.655367-2.8391469 2.194326-4.7062481.558203-1.867107.837304-3.9170723.837304-6.149896 0-2.2713186-.288726-4.3501538-.86618-6.2365054-.577453-1.8863516-1.347393-3.4647261-2.309819-4.7351237-.943176-1.2704032-2.049963-2.3386948-3.32036-3.2048749-1.251159-.88543618-2.550435-1.52063777-3.897828-1.90560483-1.328143-.40421172-2.685158-.60631758-4.071046-.60631758Zm23.397966-3.87664313h6.207638l22.347481 34.32967654V28.91359256h4.908369V69.9417316h-6.20763l-22.34749-34.3874106v34.3874106h-4.908368V28.91359256z"/><path fill="url(#a)" fill-rule="nonzero" d="M174.265411 4.50913925h6.14987L163.062778 24.0848526l-6.178763.4042146z" transform="translate(0 25)"/><path fill="url(#b)" fill-rule="nonzero" d="M162.552309 23.4815553 181.00198 44.933981h-6.323132l-18.305302-21.0482111z" transform="translate(0 25)"/><g transform="translate(0 25)"><ellipse stroke="#A3A3A3" stroke-width=".5" fill="url(#c)" fill-rule="nonzero" cx="26.8134179" cy="26.3507547" rx="26.805321" ry="26.3202814"/><path d="M9.37216085 52.0819111S17.7489335 22.7696899 50.3566889 26.4969018c0 0-20.723434-12.3020208-40.84161386 4.2828996-5.94153114 13.7625736-.14291419 21.3021097-.14291419 21.3021097Z" fill="url(#d)"/><path d="M11.8660211 48.3743096s8.7405326-21.0730284 32.0717549-21.4433648c-17.7350232 4.3205976.0290967 19.6378374.0290967 19.6378374s-14.0287234 12.7111189-32.1008516 1.8055274Z" fill="url(#e)"/><path d="M6.99959641 32.2202162S24.4574437 13.0165918 50.527832 26.2845469c-.4655559-3.607941-3.5497731-7.6814378-9.0780884-8.8452977-1.2220448-.5819257-10.1837464-14.43182348-29.4455641-6.459393 5.9256811.461387 8.4682656 1.291426 8.612541 1.9203488C10.369106 11.1390373 7.33148608 25.722572 6.99959641 32.2202162Z" fill="url(#f)"/><path d="M32.03706 15.9299212s4.4665322-1.5996384 5.0482196 3.1577417c-4.4042039.4155129-5.0482196-3.1577417-5.0482196-3.1577417Z" fill="#202020"/><path d="M9.2551104 52.1772666s7.6361082-24.9093105 33.1663186-25.8730411c0 0-20.7166787-3.7798413-35.34817197 19.3977044-.08112197 3.2790716 2.18185337 6.4753367 2.18185337 6.4753367Z" fill="url(#g)"/><path d="M12.0256021 10.9822724s6.3677384.3703449 8.6411954 1.9339868c.9492333-.1952797 1.7552122-.8451998 1.892222-1.7303694-.8145463-.337105-8.2702464-.9442903-10.5334174-.2036174Z" fill="url(#h)"/><path d="M7.05701562 32.2533371s7.97220928-9.5753699 24.06662038-10.719313c0 0-21.9094907.9901814-23.7487686 7.1768481-.5113449 1.4876671-.31785178 3.5424649-.31785178 3.5424649Z" fill="url(#i)"/></g></g></svg>`,
htmlDonate =
`<div class="about-newspaper" id="about-donate">
<div><big><b>Donations</b></big></div>
<p>No, thank you. Yet, I do appreciate your concern.</p>
<p><big><b>Here are some things you can do instead</b></big></p>
<p>In no particular order …</p>
<ul>
<li>Talk with your friends about the benefits of RSS (i.e. Web Feeds). That would be a good table talk.</li>
<li>Use an RSS reader. (See list of programs in Help menu)</li>
<li>Teach other people to use RSS readers. Blog about RSS readers. And about other open web technologies and apps.</li>
<li>Write a blog instead of posting to “social networks”. (You can always re-post to those places if you want to extend your reach.) <a href="https://micro.blog/">Micro.blog</a> is one good place to get going, and it’s not the only one.</li>
<li>Contact <a href="http://unicode.org/pending/proposals.html"><u>unicode.org</u></a> and promote the initiative for the <a href="https://github.com/vhf/unicode-syndication-proposal"><u>Proposal to Include Web Syndication Symbol</u></a>.</li>
<li>Donate to charities that promote literacy.</li>
<li>Tell other people about cool blogs and feeds you’ve found.</li>
<li>Support independent podcast apps and desktop programs.</li>
<li>Support your local library.</li>
<li>Be bold and do your best work.</li>
<li>Support indie developers. Even though software like Falkon, Newspaper, postmarketOS etc. are free, software are most definitely not free to make, and it costs time and effort to keep improving them. It’s worth it.</li>
<li>Finally: report bugs and make feature requests on our Issues tracker. We also need testers, writers, and, especially, people who are willing to talk things over. Most of software development is just making decisions, and we appreciate all the help we can get!.</li>
<li>Or: skip helping us, and, instead, help people who need help more than we do. Those people should not be hard to find.</li>
<li>Buy a meal to a person in need, or, even better, get a job for him or her.</li>
<li>Establish a family, or if you already are a parent, bring a new healthy child to the world.</li>
<li>Get more ideas from <a href="https://github.com/Ranchero-Software/NetNewsWire/blob/main/Technotes/HowToSupportNetNewsWire.markdown#here-are-some-things-you-can-do">Ranchero-Software/NetNewsWire</a>.</li>
</ul>
<p>If you happen to visit in the Middle East, reach me out and we can meet for a café or tea.</p>
<p>Sharing is caring, and is exactly what makes us humans. It's "all of us for all of us" or we're on our own.</p>
<p>Schimon</p>
<div class="decor"></div>
<div class="quote">
<p>(The syndication technology behind ActivityPub, Atom and RSS is)</p>
<p>"The very simple technology that Big Corps, Fortune 500, Mozilla et al. are jealously trying to oppress and conceal from you";</p>
<p>"Because it unleashes the embodiment of what open web should really be, a truely free-speech-driven web."</p>
<p>"The problem, for them, is that if true openness would flourish, it might have the "dire" potential, at least for them, to put many of them off the market".</p>
<p>-- Alex James Anderson</p>
</div>
</div>`,
htmlAbout =
`<div class="about-newspaper" id="about-feed">
<div class="quote content">
<p>"The technology that Big Corps, Fortune 500 and Mozilla et al. want you to forget". -- Alex James Anderson</p>
</div>
<div><big><b>Table of contents</b></big></div>
<ul class="content" id="about-toc">
<li><a href="#intro">About news feed</a></li>
<li><a href="#feeds">List of feeds sorted by subjects</a></li>
<li><a href="#software">List of <abbr title="feed readers">apps</abbr> for desktop and mobile</a></li>
<li><a href="#services">List of online services with syndication</a></li>
<li><a href="#learn">Historical review about web feeds</a></li>
<li><a href="#plea">An appeal from the author</a></li>
</ul>
<div><big>📰 <b>Web syndication news feed</b></big></div>
<div class="content" id="intro">
<p>Syndication feed is a mean for content and media publishers to reach a wider audience easily. It allows you to receive information directly without the going from site to site.</p>
<p>Essentially, a feed embodies a function that allows “Feed Readers” to access multiple websites, automatically looking for new contents and then posting the information about new contents and updates to another website, mobile app or desktop software at your office.</p>
<p>Feeds provide a simple way to keep up with the latest news, events, package and delivery status information posted on different websites such as news sites, music sites, content sites (aka “social networks”), torrent indexers, podcasts and <a href="#feeds"><u>more</u></a>; all, in one single spot.</p>
<p>In the hope that you would find this program useful; and in the hope that you would enjoy and get the most out of this program!</p>
<p>Read more on: <a href="http://rss.userland.com/howUseRSS">How You Can Use RSS</a> and <a href="http://rss.userland.com/whyImportant">Why is RSS Important?</a> and <a href="https://marcus.io/blog/making-rss-more-visible-again-with-slash-feeds">Making RSS more accessible with a /feeds page</a>.</p>
</div>
<div class="decor"></div>
<!-- div><big>📗 <b>Recommended feeds</b></big></div -->
<!-- div><big>{ } <b><rss> is everywhere</b></big></div -->
<div><big><span class="text-icon">RSS</span> <b>is everywhere</b></big></div>
<div class="content" id="feeds">
<p>This is a list of feeds that should get you started with your news reader <a href="#software"><u>app or software</u></a>.</p>
<p>The format of the feeds below is vary, from ActivityStreams and JSON to Atom and RDF, not only RSS.</p>
<div class="category">
<div>Art, Literature & Nature</div>
<a href="https://4columns.org/feed">4Columns</a>
<a href="https://annas-blog.org/rss.xml">Anna’s Blog</a>
<a href="https://audiobookbay.is/feed/atom/">AudioBook Bay</a>
<a href="https://barnesreview.org/feed/">Barnes Review</a>
<a href="https://www.kusc.org/feed/">Classical KUSC</a>
<a href="https://darksitefinder.com/feed/">Dark Site Finder</a>
<a href="https://tpb.party/rss/new/601">E-books (TPB)</a>
<a href="http://freedif.org/blog.atom">Freedif</a>
<a href="https://sacred-texts.com/rss/new.xml">ISTA - Internet Sacred Text Archive</a>
<a href="https://librivox.org/feed/">LibriVox News</a>
<a href="https://librivox.org/rss/latest_releases">LibriVox's New Releases</a>
<a href="https://www.music-scores.com/blog/feed/">Music Scores Blog</a>
<a href="https://onlinebooks.library.upenn.edu/newrss.xml">New Online Books</a>
<a href="https://www.nioc.eu/rss">Nioc Photos</a>
<a href="https://www.transformativeworks.org/feed/">Organization for Transformative Works</a>
<a href="https://www.brainyquote.com/link/quotebr.rss">Quotes</a>
<a href="https://roaring.earth/feed/">Roaring Earth</a>
<a href="https://www.rockandice.com/feed/">Rock and Ice Magazine</a>
<a href="https://zenfolio.com/feed">Ron Reyes Photography</a>
<a href="https://publicdomainreview.org/rss.xml">The Public Domain Review</a>
<a href="https://www.torrent911.me/rss/ebooks">Torrent911</a>
</div>
<div class="category">
<div>Blogroll & Videos</div>
<a href="https://nerdy.dev/rss.xml">Adam Argyle</a>
<a href="https://altcensored.com/feed">altCensored</a>
<a href="https://carlschwan.eu/index.xml">Carl Schwan</a>
<a href="https://arantius.com/feed.rss">Tony (Anthony) Lieuallen</a>
<a href="https://automationrhapsody.com/feed/">Automation Rhapsody</a>
<a href="https://denshi.live/feeds/videos.atom">denshi.live</a>
<a href="https://denshi.org/index.xml">DenshiSite</a>
<a href="https://tilde.town/~dustin/index.xml">~dustin</a>
<a href="https://nu.federati.net/api/statuses/user_timeline/16.as">GeniusMusing (@geniusmusing)</a>
<a href="https://nu.federati.net/api/statuses/user_timeline/2.as">LinuxWalt (@lnxw48a1)</a>
<a href="https://problogger.com/feed/">ProBlogger</a>
<a href="https://singpolyma.net/feed/action_stream/?full">Stephen Paul Weber</a>
<a href="http://thedarnedestthing.com/atom.xml">the darnedest thing</a>
<a href="https://geniusmusing.com/feed/rss">The Random Thoughts of GeniusMusing</a>
<a href="http://truthstreammedia.com/feed/">Truthstream Media</a>
<a href="https://unixsheikh.com/feed.rss">unixsheikh.com</a>
<a href="https://webring.xxiivv.com/#rss">Webring (index)</a>
<a href="https://willnorris.com/atom.xml">willnorris.com</a>
</div>
<div class="category">
<div>Comic, Entertainment & Games</div>
<a href="https://abstrusegoose.com/atomfeed.xml">Abstruse Goose</a>
<a href="https://www.basicinstructions.net/basic-instructions?format=rss">Basic Instructions</a>
<a href="http://cdrom.ca/feed.xml">CD-ROM Journal</a>
<a href="https://www.crossfire.nu/feed/journals">Crossfire Journals</a>
<a href="https://www.crossfire.nu/feed/news">Crossfire News</a>
<a href="https://dieselsweeties.com/ds-unifeed.xml">Diesel Sweeties</a>
<a href="https://www.dsogaming.com/feed/">DSOGaming</a>
<a href="https://www.gamingonlinux.com/article_rss.php">GamingOnLinux</a>
<!-- a href="https://joyreactor.com/rss">JoyReactor</a -->
<!-- a href="https://joyreactor.cc/rss">JoyReactor (RU)</a -->
<a href="https://lichess.org/blog.atom">Lichess</a>
<a href="https://mindblur.thecomicseries.com/rss/">Mindblur</a>
<a href="https://pikabu.ru/xmlfeeds.php?cmd=popular">pikabu.ru</a>
<a href="https://revive.thecomicseries.com/rss/">Revive</a>
<a href="https://pbfcomics.com/feed/">The Perry Bible Fellowship</a>
<a href="https://toothpastefordinner.com/rss/rss.php">Toothpaste For Dinner</a>
<a href="https://xkcd.com/atom.xml">xkcd</a>
</div>
<div class="category">
<div>Cybersecurity, IT & Privacy</div>
<a href="https://www.bleepingcomputer.com/feed/">Bleeping Computer</a>
<a href="https://www.comparitech.com/feed/">Comparitech</a>
<a href="https://cyberscoop.com/feed/">CyberScoop</a>
<a href="https://dataoverhaulers.com/feed/">Data Overhaulers</a>
<a href="https://decrypt.fail/feed/">decrypt[.]fail</a>
<a href="https://www.hackread.com/feed/">HackRead</a>
<a href="https://nakedsecurity.sophos.com/feed/">Naked Security</a>
<a href="https://privacysavvy.com/feed/">PrivacySavvy</a>
<a href="https://www.rapidseedbox.com/feed">RapidSeedbox</a>
<a href="https://reclaimthenet.org/feed/">Reclaim The Net</a>
<a href="https://restoreprivacy.com/feed/">Restore Privacy</a>
<a href="https://fosstodon.org/@RTP.rss">(RTP) Privacy and Tech Tips</a>
<a href="https://www.schneier.com/feed/">Schneier on Security</a>
<a href="https://securityintelligence.com/feed/">Security Intelligence</a>
<a href="https://takebackourtech.org/rss/">Take Back Our Tech</a>
<a href="https://torrentfreak.com/feed/">TorrentFreak</a>
<a href="https://venturebeat.com/feed/">VentureBeat</a>
</div>
<div class="category">
<div>Discussions, Forums & Message Boards</div>
<div class="subcategory">
<div>Art, Literature and Music</div>
<a href="https://forum.librivox.org/app.php/feed">LibriVox</a>
<a href="https://community.metabrainz.org/posts.rss">MusicBrainz</a>
<a href="https://www.usingenglish.com/forum/forums/-/index.rss">UsingEnglish.com</a>
</div>
<div class="subcategory">
<div>Computer</div>
<a href="https://www.antixforum.com/feed/">antiX Linux</a>
<a href="https://bbs.archlinux.org/extern.php?action=feed&type=atom&limit=20">Arch Linux</a>
<a href="https://forum.artixlinux.org/index.php?action=.xml&type=atom&limit=20">Artix Linux</a>
<a href="https://gitlab.com/divested-mobile.atom">DivestOS Mobile</a>
<a href="https://forum.endeavouros.com/posts.rss">EndeavourOS</a>
<a href="https://forums.freebsd.org/forums/-/index.rss">FreeBSD</a>
<a href="https://forum.garudalinux.org/posts.rss">Garuda Linux</a>
<a href="https://forums.kali.org/external.php?type=RSS2">Kali Linux</a>
<a href="http://board.kolibrios.org/app.php/feed">KolibriOS</a>
<a href="https://forum.linux-hardware.org/index.php?action=.xml&type=atom&limit=20">Linux Hardware Review</a>
<a href="https://forum.mxlinux.org/feed">MX Linux</a>
<a href="https://discourse.nixos.org/posts.rss">NixOS</a>
<a href="https://www.pclinuxos.com/forum/index.php?type=atom&action=.xml">PCLinuxOS</a>
<a href="https://forum.pine64.org/syndication.php?type=atom1.0">PINE64</a>
<a href="https://reactos.org/forum/app.php/feed">ReactOS</a>
<a href="https://forum.xda-developers.com/f/-/index.rss">XDA</a>
</div>
<div class="subcategory">
<div>DIY and Household</div>
<a href="https://www.diychatroom.com/forums/-/index.rss">DIY Home Improvement</a>
<a href="https://www.doityourself.com/forum/external.php?type=RSS2">DoItYourself.com</a>
<a href="https://houserepairtalk.com/forums/-/index.rss">Home Improvement, Remodeling & Repair</a>
</div>
<div class="subcategory">
<div>Games</div>
<a href="https://www.crossfire.nu/feed/threads">Crossfire</a>
<a href="https://www.gamingonlinux.com/forum_rss.php">GamingOnLinux</a>
<a href="https://www.vogons.org/feed">VOGONS</a>
<a href="https://forum.zdoom.org/app.php/feed">ZDoom</a>
</div>
<div class="subcategory">
<div>Miscellaneous</div>
<a href="https://www.happiness.com/rss/1-happinesscom-magazine.xml/">Happiness and Meditation</a>
<a href="https://forum.invoiceninja.com/posts.rss">Invoice Ninja</a>
<a href="https://www.solveforum.com/forums/forums/-/index.rss">SolveForum</a>
<a href="https://sqlite.org/forum/timeline.rss">SQLite</a>
<a href="https://zigforums.com/xml/feed.rss">Zig</a>
</div>
<div class="subcategory">
<div>Nature</div>
<a href="https://www.climate-debate.com/feeds/threads.php" title="Earth is not a globe. There is no weather crisis.">Climate Debate</a>
<a href="https://ifers.forumotion.com/feed/?type=atom" title="Yes. You and I are living on an enclosed horizontal plane. Do not use the word 'flat', Flat is a bad reference to our horizontal earth that intentionally was made over the years in order to retract you from looking into this matter.">IFERS (Horizontal Earth)</a>
</div>
<div class="subcategory">
<div>Network and Security</div>
<a href="https://community.bitwarden.com/posts.rss">Bitwarden</a>
</div>
<div class="subcategory">
<div>Telecommunication</div>
<a href="http://i2pforum.i2p/app.php/feed">I2P support</a>
<a href="https://forum.jami.net/posts.rss">Jami</a>
<a href="https://forum.tribler.org/latest.rss">Tribler</a>
</div>
</div>
<div class="category">
<div>DIY (3D Modeling & Printing, Architecture and Crafting)</div>
<a href="http://tracker2.postman.i2p/?view=RSS&mapset=85701">Cad/3D Printing</a>
<a href="https://designoptimal.com/feed/">DesignOptimal</a>
<a href="https://www.doityourself.com/feed">Doityourself.com</a>
<a href="https://www.elementalchile.cl/en/feed/">Elemental</a>
<a href="https://www.familyhandyman.com/feed/">Family Handyman</a>
<a href="https://www.opensourceecology.org/feed/">Open Source Ecology</a>
<a href="https://tpb.party/rss/new/605">Physibles (TPB)</a>
<a href="http://yorik.uncreated.net/feed">Yorik's blog</a>
</div>
<div class="category">
<div>Electronics, Hacking & Robotics</div>
<a href="https://crlf.link/feed.xml">&Cr; &Lf;</a>
<a href="http://dangerousprototypes.com/blog/feed/">Dangerous Prototypes</a>
<a href="https://electro.pizza/feed.xml">electro·pizza</a>
<a href="https://blog.flipperzero.one/rss/">Flipper Zero Blog</a>
<a href="https://knuxify.github.io/blog/feed.xml">knuxify’s blog</a>
<a href="https://mansfield-devine.com/speculatrix/feed/">Machina Speculatrix</a>
<a href="http://moderntoil.com/?feed=rss2">Modern Toil</a>
<a href="https://n-o-d-e.net/rss/rss.xml">N O D E</a>
<a href="https://www.open-electronics.org/feed/atom/">Open Electronics</a>
<a href="https://rfidresearchgroup.com/feed/">RFID Research Group</a>
<a href="https://smartbuilds.io/feed/">SmartBuilds</a>
<a href="https://webring.xxiivv.com/#rss">Webring (index)</a>
</div>
<div class="category">
<div>Family, Leisure & Travel</div>
<a href="https://www.baldandbeards.com/feed/">Bald & Beards</a>
<a href="https://blastaloud.com/feed/atom/">BlastAloud</a>
<a href="https://dailyurbanista.com/feed/atom/">Daily Urbanista</a>
<a href="https://divinelifestyle.com/feed/">Divine Lifestyle</a>
<a href="https://expertvagabond.com/feed/">Expert Vagabond</a>
<a href="https://www.girlschase.com/rss.xml">Girls Chase</a>
<a href="https://latest-fashion-tips.com/feed/">Latest Fashion Tips</a>
<a href="https://www.mom-on-a-mission.blog/all-posts?format=rss">Mom on a Mission</a>
<a href="https://rebelliousdevelopment.com/feed">Rebellious Development</a>
<a href="https://www.artofmanliness.com/feed/">The Art of Manliness</a>
<a href="https://thebaldbrothers.com/feed/">The Bald Brothers</a>
<a href="https://theeverygirl.com/feed/">The Everygirl</a>
<a href="https://thefrugalgirls.com/feed">The Frugal Girls</a>
</div>
<div class="category">
<div>Government, Politics & World Affairs News</div>
<a href="https://www.blacklistednews.com/rss.php">BlackListed News</a>
<a href="https://www.cryptogon.com/?feed=atom">cryptogon</a>
<a href="https://mastodon.social/@Cryptome.rss">Cryptome</a>
<a href="https://fakeologist.com/feed/">Fakeologist</a>
<a href="https://leohohmann.com/feed/">Leo Hohmann</a>
<a href="https://www.elegislation.gov.hk/verified-chapters!en.rss.xml">List of Verified Legislation (Hong Kong e-Legislation)</a>
<a href="https://off-guardian.org/feed/">OffGuardian</a>
<a href="https://www.presstv.ir/rss.xml">Press TV</a>
<a href="https://redice.tv/rss/news">Red Ice News</a>
<a href="https://www.rt.com/rss/">RT (Russia Today)</a>
<a href="https://seymourhersh.substack.com/feed">Seymour Hersh</a>
<a href="https://stevekirsch.substack.com/feed">Steve Kirsch</a>
<a href="https://stewpeters.com/feed/">Stew Peters</a>
<a href="https://strategicinvestment.com/page/str/rssfeed.xml">Strategic Investment</a>
<a href="https://canadianpatriot.org/feed/">the Canadian patriot</a>
<a href="https://dailysceptic.org/feed/">The Daily Sceptic</a>
<a href="https://www.dailywire.com/feeds/rss.xml">The Daily Wire</a>
<a href="https://www.thegatewaypundit.com/feed/">The Gateway Pundit</a>
<a href="http://themostimportantnews.com/feed">The Most Important News</a>
<a href="https://www.theorganicprepper.com/feed/">The Organic Prepper</a>
<a href="http://truthstreammedia.com/feed/">Truthstream Media</a>
<a href="https://unlimitedhangout.com/feed/">Unlimited Hangout</a>
</div>
<div class="category">
<div>Health, Nutrition & Recipes</div>
<a href="https://www.101cookbooks.com/feed">101 Cookbooks</a>
<a href="https://www.asweetpeachef.com/feed/">A Sweet Pea Chef</a>
<a href="https://www.annalenashearthbeat.com/feed/">Annalena's Heart(h)beat</a>
<a href="https://askannamoseley.com/feed/">Ask Anna</a>
<a href="https://cooknourishbliss.com/feed/">Cook Nourish Bliss</a>
<a href="https://www.easycookingwithmolly.com/feed/">Easy Cooking with Molly</a>
<a href="http://www.easypeasyjapanesey.com/blogeasypeasyjapanesey?format=rss">Easy Peasy Japanesey</a>
<a href="https://farmersforum.com/feed/">Farmers Forum</a>
<!--a href="https://fathub.org/feed/">FatHub</a-->
<a href="http://foodly.com/feed/">Foodly</a>
<a href="https://freezedryguy.com/feed/">Freeze Dry Guy</a>
<a href="https://heathenherbs.com/feed/">Heathen Herbs</a>
<a href="https://www.healthyandnaturalworld.com/feed/">Healthy and Natural World</a>
<a href="https://www.jamieoliver.com/feed/">Jamie Oliver</a>
<a href="https://juicing-for-health.com/feed">Juicing for Health</a>
<a href="https://www.loveandlemons.com/feed/">Love & Lemons</a>
<a href="https://articles.mercola.com/sites/articles/rss.aspx">Mercola.com</a>
<a href="https://www.mindful.org/feed/">Mindful</a>
<a href="https://nutritionaustralia.org/category/recipes/feed/">Nutrition Australia</a>
<a href="https://pinchofyum.com/feed">Pinch of Yum</a>
<a href="https://plantbasedwithamy.com/feed/">Plant Based with Amy</a>
<a href="https://punchdrink.com/feed/">PUNCH</a>
<a href="https://recipeswitholiveoil.com/feed/">Recipes With Olive Oil</a>
<a href="https://www.sheknows.com/food-and-recipes/feed/">SheKnows</a>
<a href="https://steptohealth.com/feed/">Step To Health</a>
<a href="https://stevekirsch.substack.com/feed">Steve Kirsch</a>
<a href="https://thegreenloot.com/feed/">The Green Loot</a>
<a href="https://theprettybee.com/feed/">The Pretty Bee</a>
<a href="https://traditionalcookingschool.com/feed/">Traditional Cooking School</a>
<a href="https://wonderfulcook.com/feed/">Wonderful Cook</a>
</div>
<div class="category">
<div>Music, Scores & Sound</div>
<a href="https://320kbpshouse.net/feed">320KBPSHOUSE</a>
<a href="https://acidstag.com/feed/">Acid Stag</a>
<a href="https://www.free-scores.com/rss/fluxrss-uk.xml">Free-Scores/a>
<a href="https://www.frostclick.com/wp/index.php/feed/">FrostClick</a>
<a href="https://intmusic.net/feed">IntMusic</a>
<a href="https://itopmusicx.com/feed/">iTOPMUSICX</a>
<a href="https://losslessclub.com/atom.php">LosslessClub</a>
<a href="https://nfodb.ru/rss.php">MP3 NFO Database</a>
<a href="https://tpb.party/rss/new/101">Music (TPB)</a>
<a href="https://musicrider.org/feed/">Music Rider</a>
<a href="https://losslessalbums.club/rss.xml">New lossless albums</a>
<a href="https://rss.ngfiles.com/latestsubmissions.xml">Newgrounds</a>
<a href="https://rss.ngfiles.com/weeklyaudiotop5.xml">Newgrounds (Weekly Top 5)</a>
<a href="https://phish.in/feeds/rss">Phish.in</a>
<a href="https://secondhandsongs.com/rss/new.xml">Second Hand Songs</a>
</div>
<div class="category">
<div>Podcasts & Radio</div>
<a href="https://files.manager-tools.com/files/public/feeds/career_tools_podcasts.xml">Career Tools</a>
<a href="https://fakeologist.com/blog/category/audio/fakeologistshow/feed/">Fakeologist Show</a>
<a href="http://hackerpublicradio.org/hpr_spx_rss.php">Hacker Public Radio</a>
<a href="https://www.iceagefarmer.com/feed/">Ice Age Farmer</a>
<a href="https://jameshfetzer.org/feed/">James H. Fetzer</a>
<a href="http://larkenrose.com/?format=feed">Larken Rose</a>
<a href="https://files.manager-tools.com/files/public/feeds/manager-tools-podcasts.xml">Manager Tools</a>
<a href="https://mediamonarchy.com/feed/podcast/">Media Monarchy</a>
<a href="https://feed.podbean.com/ediviney/feed.xml">Midwest Vegan Radio</a>
<a href="http://www.opensourcetruth.com/feed/">Open Source Truth</a>
<a href="https://optoutpod.com/index.xml">Opt Out</a>
<a href="https://rss.podomatic.net/rss/peacerevolution.podomatic.com/rss2.xml">Peace Revolution</a>
<a href="https://www.pine64.org/feed/mp3/">PineTalk</a>
<a href="https://cast.postmarketos.org/feed.rss">postmarketOS</a>
<a href="https://redice.tv/rss/radio-3fourteen">Radio 3Fourteen</a>
<a href="https://www.reallibertymedia.com/category/podcasts/feed/?redirect=no">Real Liberty Media</a>
<a href="https://redice.tv/rss/red-ice-radio">Red Ice Radio</a>
<a href="https://redice.tv/rss/red-ice-tv">Red Ice TV</a>
<a href="http://revolutionradio.org/feed/">Revolution Radio</a>
<a href="https://feed.podbean.com/rightonradio/feed.xml">Right on Radio</a>
<a href="https://roaring.earth/category/podcast/feed/">Roaring Earth</a>
<a href="https://speakfreeradio.com/feed/">Speak Free Radio</a>
<a href="https://www.corbettreport.com/feed/">The Corbett Report</a>
<a href="https://www.thehighersidechats.com/feed/">The Higherside Chats</a>
<a href="http://truthstreammedia.com/feed/">Truthstream Media</a>
</div>
<div class="category">
<div>Product, Real Estate, Shopping Reviews & Stores</div>
<a href="https://www.cambodiaproperty.info/feed/">Cambodia Property</a>
<a href="https://www.geartaker.com/feed/">Gear Taker</a>
<a href="https://lab401.com/collections/flipper-zero.atom">Lab401</a>
<a href="https://liliputing.com/feed/">Liliputing</a>
<a href="https://www.megabites.com.ph/feed/">MegaBites</a>
<a href="https://newatlas.com/index.rss">New Atlas</a>
<a href="https://www.producthunt.com/feed">Product Hunt</a>
<a href="https://www.sheknows.com/feed/">SheKnows</a>
<a href="https://www.techpowerup.com/rss/news">TechPowerUp</a>
<a href="https://www.trustedreviews.com/feed">Trusted Reviews</a>
</div>
<div class="category">
<div>Social Action (Activism)</div>
<a href="https://campaignforliberty.org/feed/">Campaign for Liberty</a>
<a href="https://fluoridealert.org/feed/">Fluoride Action Network</a>
<a href="https://www.geoengineeringwatch.org/feed/atom/">Geoengineering Watch</a>
<a href="https://primarywater.org/?feed=rss2">Primary Water</a>
<a href="https://stop5g.cz/us/feed/">Stop 5G</a>
<a href="https://stopthecrime.net/wp/feed/">Stop The Crime</a>
</div>
<div class="category">
<div>Software, Guides & Technology</div>
<a href="https://www.comparitech.com/feed/">Comparitech</a>
<a href="https://ddos-guard.net/rss">DDoS-GUARD</a>
<a href="https://www.dedoimedo.com/rss_feed.xml">Dedoimedo</a>
<a href="https://distrowatch.com/news/dw.xml">DistroWatch</a>
<a href="https://www.evilsocket.net/atom.xml">evilsocket</a>
<a href="https://blog.front-matter.io/atom/">Front Matter</a>
<a href="https://www.gamingonlinux.com/article_rss.php">GamingOnLinux</a>
<a href="https://www.ghacks.net/feed/">gHacks</a>
<a href="https://guides.lw1.at/index.xml">guides.lw1.at</a>
<a href="https://i2p.rocks/blog/feeds/all.atom.xml">i2p.rocks</a>
<a href="https://planet.jabber.org/atom.xml">Jabber World</a>
<a href="https://cyber.dabamos.de/blog/feed.rss">Lazy Reading | The Cyber Vanguard</a>
<a href="https://leimao.github.io/atom.xml">Lei Mao's Log Book</a>
<a href="https://linuxgameconsortium.com/feed/">Linux Game Consortium</a>
<a href="https://linmob.net/feed.xml">LINux on MOBile</a>
<a href="https://www.linuxuprising.com/feeds/posts/default">Linux Uprising Blog</a>
<a href="https://www.mfitzp.com/feeds/all.atom.xml">Martin Fitzpatrick
</a>
<a href="https://nerdstuff.org/index.xml">nerdstuff.org</a>
<a href="https://www.nngroup.com/feed/rss/">NN/g latest articles and announcements</a>
<a href="https://singpolyma.net/feed/">Singpolyma</a>
<a href="https://sourceforge.net/blog/feed/">SourceForge Community Blog</a>
<a href="https://www.sqlservercentral.com/articles/feed">SQLServerCentral</a>
<a href="https://tuxphones.com/rss/">TuxPhones</a>
</div>
<div class="category">
<div>Software Package Updates</div>
<a href="https://archlinux.org/feeds/packages/">Arch Linux: Recent package updates</a>
<a href="https://aur.archlinux.org/rss/">Arch Linux: AUR Newest Packages</a>
<a href="https://www.ctan.org/ctan-ann/atom.xml">CTAN: Comprehensive TeX Archive Network</a>
<a href="https://greasyfork.org/en/scripts.atom?sort=updated">Greasy Fork: Recent Updates</a>
</div>
<div class="category">
<div>Software Project Updates</div>
<div class="subcategory">
<div>Artificial Intelligence</div>
<a href="https://news.agpt.co/feed/">Auto-GPT</a>
<a href="https://translatelocally.com/rss/">Translate Locally</a>
</div>
<div class="subcategory">
<div>Communication and Social Platforms</div>
<a href="https://blog.discourse.org/rss/">Discourse</a>
<a href="https://blog.funkwhale.audio/feeds/all.atom.xml">Funkwhale</a>
<a href="https://jami.net/feed/">Jami</a>
<a href="https://joinpeertube.org/rss-en.xml">PeerTube</a>
<a href="https://typo3.org/rss">TYPO3</a>
</div>
<div class="subcategory">
<div>Desktop and Operating Systems</div>
<a href="https://artixlinux.org/feed.php">Artix Linux</a>
<a href="https://gitlab.com/divested-mobile/divestos-build.atom">DivestOS-Build activity</a>
<a href="https://www.dragonflydigest.com/feed/">DragonFly BSD Digest</a>
<a href="https://sourceforge.net/p/freedos/news/feed.rss">FreeDOS</a>
<a href="https://blogs.gnome.org/pabloyoyoista/feed/">GNOME adventures in mobile</a>
<a href="https://blogs.gnome.org/shell-dev/feed/">GNOME Shell & Mutter</a>
<a href="https://libreboot.org/feed.xml">Libreboot</a>
<a href="https://mobile.nixos.org/index.xml">Mobile NixOS</a>
<a href="https://www.pine64.org/feed/">PINE64</a>
<a href="https://postmarketos.org/blog/feed.atom">postmarketOS</a>
<a href="https://www.qemu.org/feed.xml">QEMU</a>
<a href="https://reactos.org/index.xml">ReactOS</a>
<a href="https://blog.replicant.us/feed/">Replicant</a>
<a href="https://ubports.com/blog/ubports-news-1/feed">UBports</a>
</div>
<div class="subcategory">
<div>Development and Statistics</div>
<a href="https://flatassembler.net/atom.php">FASM (flat assembler)</a>
<a href="https://blog.gtk.org/feed/">GTK Toolkit</a>
<a href="https://kde.org/index.xml">KDE Toolkit</a>
<a href="https://labplot.kde.org/feed/">LabPlot</a>
<a href="https://plausible.io/blog/feed.xml">Plausible Analytics</a>
<a href="https://blog.rust-lang.org/feed.xml">Rust</a>
</div>
<div class="subcategory">
<div>Education</div>
<a href="https://gcompris.net/feed-en.xml">GCompris</a>
</div>
<div class="subcategory">
<div>Graphics and Multimedia</div>
<a href="https://sourceforge.net/p/butt/activity/feed">Broadcast Using This Tool</a>
<a href="https://obsproject.com/blog/rss">Open Broadcaster Software</a>
<a href="https://kdenlive.org/en/feed/">Kdenlive</a>
<a href="https://krita.org/en/feed/">Krita</a>
</div>
<div class="subcategory">
<div>Network and Web</div>
<a href="https://www.falkon.org/atom.xml">Falkon Browser</a>
<a href="https://leafletjs.com/atom.xml">Leaflet Dev Blog</a>
<a href="https://blogs.gnome.org/thaller/feed/">NetworkManager</a>
<a href="https://otter-browser.org/feed/">Otter Browser</a>
<a href="https://servo.org/blog/feed.xml">Servo</a>
<a href="https://spidermonkey.dev/feed.xml">SpiderMonkey</a>
<a href="https://www.uzbl.org/atom.xml">Uzbl Browser</a>
</div>
<div class="subcategory">
<div>Package Management</div>
<a href="https://f-droid.org/feed.xml">F-Droid Store</a>
</div>
<div class="subcategory">
<div>Security</div>
<a href="https://bitwarden.com/blog/feed.xml">Bitwarden</a>
</div>
</div>
<div class="category">
<div>Syndication & XML</div>
<a href="https://www.dublincore.org/index.xml">Dublin Core</a>
<a href="https://www.jsonfeed.org/feed.xml">JSON Feed</a>
<a href="https://microformats.org/feed">Microformats</a>
<a href="https://openrss.org/rss">Open RSS</a>
<a href="http://opml.org/?format=opml">OPML</a>
<a href="http://feeds.rssboard.org/rssboard">RSS Advisory Board</a>
<a href="https://blog.saxonica.com/atom.xml">Saxonica</a>
<a href="http://docs.subtome.com/feed.xml">SubToMe</a>
<a href="https://sword.cottagelabs.com/feed/">SWORD</a>
<a href="http://rss.userland.com/xml/rss.xml">UserLand RSS Central</a>
<a href="http://xml.coverpages.org/covernews.xml">XML Cover Pages</a>
<a href="https://www.xml.com/feed/all/">XML.com</a>
</div>
<div class="category">
<div>Telecom, Mesh & Mix Protocols</div>
<a href="https://gemini.circumlunar.space/news/atom.xml">Gemini Project</a>
<a href="https://www.gnunet.org/en/rss.xml">GNUnet</a>
<a href="https://gopher.zone/index.xml">Highway to the Gopher Zone</a>
<a href="https://geti2p.net/en/feed/blog/atom">I2P Blog</a>
<a href="https://blog.ipfs.io/index.xml">IPFS</a>
<a href="https://blog.nymtech.net/feed">Nym</a>
<a href="https://oxen.io/feed/atom">Oxen (Session & Lokinet)</a>
<a href="https://panoramix-project.eu/feed/">Panoramix</a>
<a href="https://blog.torproject.org/feed.xml">Tor Project</a>
<a href="https://www.w3.org/blog/news/feed/atom">W3C</a>
<a href="https://xmpp.org/feeds/all.atom.xml">XMPP Blog</a>
<a href="https://yggdrasil-network.github.io/feed.xml">Yggdrasil Network</a>
</div>
<div class="category">
<div>Torrents</div>
<a href="https://androidkino.net/rss.xml">AndroidKino (RU)</a>
<a href="https://angietorrents.cc/rss.php?custom=1">AngieTorrents</a>
<a href="https://anidex.info/rss/">AniDex Tracker (JA)</a>
<a href="https://www.anirena.com/rss.php">AniRena (JA)</a>
<a href="https://audiobookbay.is/feed/atom/">AudioBook Bay</a>
<a href="https://bangumi.moe/rss/latest">Bangumi Moe</a>
<a href="https://eztv.re/ezrss.xml">EZTV</a>
<a href="http://firebit.org/rss.xml">FireBit</a>
<a href="https://fosstorrents.com/feed/distribution.xml">FOSS Torrents - Distributions</a>
<a href="https://fosstorrents.com/feed/game.xml">FOSS Torrents - Games</a>
<a href="https://fosstorrents.com/feed/software.xml">FOSS Torrents - Softwares</a>
<a href="https://igg-games.com/feed">Install Guide Games</a>
<a href="https://www.limetorrents.lol/rss/">Lime Torrents</a>
<a href="https://nyaa.si/?page=rss">Nyaa</a>
<a href="https://pcgamestorrents.com/feed">PCGamesTorrents</a>
<a href="http://tracker2.postman.i2p/?view=AddRSSMap">Postman</a>
<a href="https://rarbg.to/rss.php">RARBG</a>
<a href="http://rutor.info/rss.php">RUTOR (EN/RU)</a>
<a href="https://sktorrent.org/feed_rss.xml">SkTorrent</a>
<a href="https://tpb.party/rss">The Pirate Bay</a>
<a href="https://tokyo-tosho.net/rss.php">Tokyo Toshokan</a>
<!--a href="https://www.tokyotosho.info/rss.php">Tokyo Toshokan</a-->
<a href="https://www.torlock.com/rss.xml">Torlock</a>
<a href="https://www.torrent911.me/rss">Torrent911 (ES)</a>
<a href="https://www.torrentdownload.info/feed_latest">Torrent Download</a>
<a href="https://www.torrentdownloads.pro/rss.xml">Torrent Downloads</a>
<a href="https://booktracker.org/rss.php">Книжный трекер (RU)</a>
<a href="https://gamestracker.org/torrents/rss/">Торрент игры (RU)</a>
</div>
</div>
<div class="decor"></div>
<div><big>💿 <b>Install a feed reader</b></big></div>
<div class="content" id="software">
<p>This is a list of desktop applications, mobile apps and online services for you to choose from.</p>
<p>This list includes news readers, podcast managers, torrent clients and web browsers which support web feeds.</p>
<p>Recommended programs are marked with 🔖</p>
<div id="filter">
<span class="filter" id="torrent">BitTorrent</span>
<span class="filter" id="news">News</span>
<span class="filter" id="music">Podcast</span>
<span class="filter" id="web">Web Browser</span>
</div>
<div class="category">
<div>Desktop</div>
<div class="subcategory">
<div>Linux</div>
<a class="news" href="https://apps.kde.org/akregator/">Akregator</a>
<a class="music" href="https://amarok.kde.org/">Amarok</a>
<a class="web" href="https://brave.com/">Brave</a>
<a class="torrent" href="https://deluge-torrent.org/">Deluge</a>
<a class="news" href="https://github.com/jeena/FeedTheMonkey">Feed The Monkey</a>
<a class="music" href="https://gpodder.github.io/">gPodder</a>
<a class="music" href="https://apps.kde.org/kasts/">Kasts</a>
<a class="news recom" href="https://leechcraft.org/">LeechCraft</a>
<a class="news recom" href="https://lzone.de/liferea/">Liferea</a>
<a class="news recom" href="https://gitlab.com/news-flash/news_flash_gtk/">NewsFlash</a>
<a class="web" href="https://otter-browser.org/">Otter Browser</a>
<a class="torrent" href="https://www.qbittorrent.org/">qBittorrent</a>
<a class="news" href="https://quiterss.org/">QuiteRSS</a>
<a class="news" href="https://github.com/martinrotter/rssguard">RSS Guard</a>
<a class="news" href="http://www.rssowl.org/">RSSOwl</a>
<a class="music" href="https://wiki.gnome.org/Apps/Rhythmbox">Rhythmbox</a>
<a class="music" href="https://strawberrymusicplayer.org/">Strawberry Music Player</a>
<a class="news" href="https://www.open-tickr.net/">TICKR</a>
<a class="torrent recom" href="https://www.tribler.org/">Tribler</a>
<a class="web" href="https://vivaldi.com/features/feed-reader/">Vivaldi</a>
</div>
<div class="subcategory">
<div>macOS</div>
<a class="music" href="https://amarok.kde.org/">Amarok</a>
<a class="web" href="https://brave.com/">Brave</a>
<a class="torrent" href="https://deluge-torrent.org/">Deluge</a>
<a class="music" href="https://gpodder.github.io/">gPodder</a>
<a class="news recom" href="https://leechcraft.org/">LeechCraft</a>
<a class="news recom" href="https://netnewswire.com/">NetNewsWire</a>
<a class="web" href="https://otter-browser.org/">Otter Browser</a>
<a class="torrent" href="https://www.qbittorrent.org/">qBittorrent</a>
<a class="news" href="https://quiterss.org/">QuiteRSS</a>
<a class="news" href="https://github.com/martinrotter/rssguard">RSS Guard</a>
<a class="news" href="http://www.rssowl.org/">RSSOwl</a>
<a class="music" href="https://strawberrymusicplayer.org/">Strawberry Music Player</a>
<a class="torrent recom" href="https://www.tribler.org/">Tribler</a>
<a class="web" href="https://vivaldi.com/features/feed-reader/">Vivaldi</a>
</div>
<div class="subcategory">
<div>React OS and Windows</div>
<a class="music" href="https://amarok.kde.org/">Amarok</a>
<a class="web" href="https://brave.com/">Brave</a>
<a class="torrent" href="https://deluge-torrent.org/">Deluge</a>
<a class="music" href="https://gpodder.github.io/">gPodder</a>
<a class="web" href="http://kmeleonbrowser.org/">K-Meleon</a>
<a class="news recom" href="https://leechcraft.org/">LeechCraft</a>
<a class="web" href="https://otter-browser.org/">Otter Browser</a>
<a class="torrent" href="https://www.qbittorrent.org/">qBittorrent</a>
<a class="news" href="https://quiterss.org/">QuiteRSS</a>
<a class="news" href="http://rssbandit.org/">RSS Bandit</a>
<a class="news" href="https://github.com/martinrotter/rssguard">RSS Guard</a>
<a class="news" href="http://www.rssowl.org/">RSSOwl</a>
<a class="news" href="http://sharpreader.net/">SharpReader</a>
<a class="music" href="https://strawberrymusicplayer.org/">Strawberry Music Player</a>
<a class="torrent recom" href="https://www.tribler.org/">Tribler</a>
<a class="web" href="https://vivaldi.com/features/feed-reader/">Vivaldi</a>
</div>
</div>
<div class="category">
<div>Mobile</div>
<div class="subcategory">
<div>Android</div>
<a class="web" href="https://brave.com/">Brave</a>
<a class="news" href="https://f-droid.org/en/packages/com.nononsenseapps.feeder/">Feeder</a>
<a class="music" href="https://apps.kde.org/kasts/">Kasts</a>
<a class="torrent" href="https://f-droid.org/en/packages/org.proninyaroslav.libretorrent/">LibreTorrent</a>
<a class="music" href="https://f-droid.org/en/packages/io.gitlab.listentogether">ListenTogether</a>
<a class="news" href="https://f-droid.org/en/packages/co.appreactor.news/">News</a>
<a class="news" href="https://f-droid.org/en/packages/com.nunti/">Nunti</a>
<a class="music" href="https://f-droid.org/en/packages/com.podverse.fdroid/">Podverse</a>
<a class="news" href="https://f-droid.org/en/packages/me.ash.reader/">Read You</a>
<a class="news recom" href="https://f-droid.org/en/packages/com.aerotoad.thud/">Thud</a>
<a class="web" href="https://vivaldi.com/features/feed-reader/">Vivaldi</a>
</div>
<div class="subcategory">
<div>GerdaOS / KaiOS</div>
<a class="news" href="https://store.bananahackers.net/#feedolin">feedolin</a>
<a class="music" href="https://store.bananahackers.net/#FoxCastLite">FoxCast Lite</a>
<a class="music" href="https://store.bananahackers.net/#Mica">Mica</a>
<a class="music" href="https://store.bananahackers.net/#PodKast">PodKast</a>
<a class="music" href="https://store.bananahackers.net/#podlp">PodLP</a>
<a class="news" href="https://store.bananahackers.net/#n4no.com.rss-reader">RSS Reader</a>
</div>
<div class="subcategory">
<div>iOS</div>
<a class="web" href="https://brave.com/">Brave</a>
<a class="news" href="https://netnewswire.com/">NetNewsWire</a>
<a class="music" href="https://github.com/guumeyer/Podcast">Podcast</a>
<a class="music" href="https://github.com/rafaelclaycon/PodcastApp">PodcastApp</a>
</div>
<div class="subcategory">
<div>postmarketOS</div>
<a class="news" href="https://apps.kde.org/alligator/">Alligator</a>
<a class="news" href="https://gfeeds.gabmus.org/">Feeds</a>
<a class="music" href="https://gpodder.github.io/">gPodder</a>
<a class="music" href="https://apps.kde.org/kasts/">Kasts</a>
</div>
<div class="subcategory">
<div>Sailfish OS</div>
<a class="news" href="https://github.com/mkiol/kaktus">Kaktus</a>
<a class="news" href="https://github.com/donaggio/harbour-feedhaven">Feed Haven</a>
<a class="news" href="http://gitlab.unique-conception.org/apps-4-sailfish/feed-me">Feed Me</a>
<a class="music" href="https://gpodder.github.io/">gPodder</a>
<a class="news" href="https://github.com/walokra/haikala">Haikala</a>
<a class="news" href="https://github.com/pycage/tidings">Tidings</a>
</div>
<div class="subcategory">
<div>Tizen</div>
<a class="news" href="https://github.com/CESARBR/tizenreader">Tizen Reader</a>
</div>
<div class="subcategory">
<div>Ubuntu Touch</div>
<a class="music" href="https://open-store.io/app/com.mikeasoft.podbird">Podbird</a>
<a class="music" href="https://open-store.io/app/soy.iko.podphoenix">Podphoenix</a>
<a class="news" href="https://open-store.io/app/rssreader.florisluiten">RSSreader</a>
<a class="news" href="https://open-store.io/app/simplestrss.kazord">SimplestRSS</a>
<!-- a class="torrent" href="https://open-store.io/app/transmission.pavelprosto">Transmission</a -->
<!-- a class="torrent" href="https://open-store.io/app/tr.davidv.dev">Transmission Remote</a -->
<a class="news" href="https://open-store.io/app/darkeye.ursses">uRsses</a>
</div>
</div>
<div class="category">
<div>Terminal</div>
<a class="news" href="https://codezen.org/canto-ng/">Canto</a>
<a class="news" href="https://newsboat.org/">Newsboat</a>
<a class="news" href="https://sr.ht/~ghost08/photon/">Photon</a>
<a class="torrent" href="https://github.com/rakshasa/rtorrent">RTorrent</a>
<a class="torrent" href="https://github.com/dpsenner/bridge-from-torrent-rss-feed-to-rtorrent">bridge-from-torrent-rss-feed-to-rtorrent</a>
<a class="news" href="https://codemadness.org/sfeed_curses-ui.html">Sfeed</a>
</div>
<div class="category">
<div>Web (self hosted)</div>
<a class="news" href="https://feedbin.com/">Feedbin</a>
<a class="news" href="http://feedonfeeds.com/">Feeds on Feeds</a>
<a class="news" href="https://freshrss.org/">FreshRSS</a>
<a class="news" href="https://miniflux.app/">Miniflux</a>
<a class="news" href="https://offog.org/code/rawdog/">rawdog</a>
<a class="news" href="https://github.com/acavalin/rrss">RRSS</a>
<a class="torrent" href="https://github.com/Novik/ruTorrent">ruTorrent</a>
<a class="news" href="https://tt-rss.org/">Tiny Tiny RSS</a>
</div>
<div class="category">
<div>Web (service)</div>
<a class="news" href="https://feedbin.com/">Feedbin</a>
<a class="news" href="https://feeder.co/">Feeder</a>
<a class="news" href="https://feedly.com/">Feedly</a>
<a class="news" href="https://goodnews.click/">Good News</a>
<a class="news" href="https://www.inoreader.com/">Inoreader</a>
<a class="news" href="http://www.netvibes.com/en">Netvibes</a>
<a class="news" href="https://newsblur.com/">NewsBlur</a>
<a class="news" href="https://www.reedah.com/">Reedah</a>
<a class="news" href="https://theoldreader.com/">The Old Reader</a>
</div>
</div>
<div class="decor"></div>
<div><big>📢 <b>Speak your mind!</b></big></div>
<div class="content">
<p>Do you want to start a syndication-enabled podcast?</p>
<p>The following blog and podcast services provide access to syndication.</p>
<p>Recommended service providers are marked with 🔖</p>
<div id="services">
<div class="category">
<div>Decentralized (ActivityPub)</div>
<p><i>Decentralized services are <u>very and mostly</u> encouraged; Use one account to communicate with all services and platforms.</i></p>
<a href="https://diaspora.fediverse.observer/list">diaspora*</a>
<a class="recom" href="https://funkwhale.fediverse.observer/list">Funkwhale</a>
<a href="https://instances.social/">Mastodon</a>
<a class="recom" href="https://instances.joinpeertube.org/">PeerTube</a>
</div>
<div class="category">
<div>No-charge services</div>
<p><i>Whilst all of the listed services support syndication, free of monetary charge services are generally <u>not</u> encouraged.</i></p>
<a href="https://www.acast.com/">Acast</a>
<a href="https://www.blogtalkradio.com/">Blog Talk Radio</a>
<a class="recom" href="https://www.chatons.org/search/by-service?service_type_target_id=154">Chatons (list of external services)</a>
<a href="https://castos.com/">Castos</a>
<a href="https://feedpress.com/">FeedPress</a>
<a href="http://libsyn.com/">libsyn</a>
<a class="recom" href="https://neocities.org/">Neocities</a>
<a class="recom" href="https://noblogs.org/">NoBlogs</a>
<a href="https://podbean.com/">PodBean</a>
<a href="https://podomatic.com/">Podomatic</a>
<a href="https://rawvoice.com/">RawVoice</a>
<a class="recom" href="https://tedomum.net/service/">TeDomum (list of services)</a>
</div>
<div class="category">
<div>Pay services</div>
<a href="https://www.cloudaccess.net/">CloudAccess</a>
<a href="https://www.hetzner.com/">Hetzner</a>
<a href="https://www.hostinger.co.uk/">Hostinger</a>
<a class="recom" href="https://micro.blog/">Micro.blog</a>
<a class="recom" href="https://monocles.eu/more/">monocles</a>
<a href="https://www.rochen.com/">Rochen</a>
<a href="https://www.strato.de/">STRATO</a>
<a class="recom" href="https://zourit.net/">Zourit</a>
</div>
<div class="category">
<div>Self host</div>
<p><i>You are encouraged to host <b>your own</b> server connected to <a href="https://i2pd.readthedocs.io/en/latest/tutorials/http/#host-anonymous-website"><u>the I2P network</u></a>.</i></p>
<a href="https://www.11ty.dev/">Eleventy</a>
<a href="https://dthompson.us/projects/haunt.html">Haunt</a>
<a href="https://gohugo.io/">Hugo</a>
<a href="https://jekyllrb.com/">Jekyll</a>
<a href="https://picocms.org/">Pico</a>
<a href="https://wordpress.org/">WordPress</a>
<a href="http://getzola.org/">Zola</a>
</div>
<div class="category">
<div>Of note</div>
<p>Whatever is your medium you choose to publish your podcast, best ways to make your files available are via BitTorrent, I2P and IPFS.</p>
<p>* PeerTube has built-in BitTorrent support.</p>
</div>
</div>
</div>
<div class="decor"></div>
<div><big>📚 <b>Learn more about syndication</b></big></div>
<div class="content" id="learn">
<p>This is a short history and reference guide to web feeds.</p>
<div><b>Newspaper (2021)</b></div>
<p>Newspaper is a Userscript that renders web feeds to web pages with the sole use of Javascript. <a href="https://openuserjs.org/scripts/sjehuda/Newspaper">Continue reading…</a></p>
<div><b>JSON Feed (2017)</b></div>
<p>The JSON Feed format is a pragmatic syndication format, like RSS and Atom, but with one big difference: it’s JSON instead of XML. <a href="https://www.jsonfeed.org/version/1.1/">Continue reading…</a></p>
<div><b>StreamBurner (2013)</b></div>
<p>StreamBurner is a set of XSLT stylesheets that allow the conversion of web feeds into printable and readable web pages. <a href="https://gitgud.io/sjehuda/streamburner">Continue reading…</a></p>
<div><b>Activity Streams (2008)</b></div>
<p>An extension to the Atom feed format to express what people are doing around web. The stream in ActivityStreams is a feed of related activities for a given person or social object.
<a href="https://wiki.activitystrea.ms/w/page/1359261/FrontPage">Continue reading…</a></p>
<div><b>h-entry and hAtom 0.1 (2006)</b></div>
<p>h-entry is a simple, open format for episodic or datestamped content on the web. h-entry is often used with content intended to be syndicated, e.g. blog posts. h-entry is one of several open microformat standards suitable for embedding data in HTML. <a href="http://microformats.org/wiki/h-entry">Continue reading…</a></p>
<div><b>Atom and AtomPub (2003)</b></div>
<p>Atom is the name of an XML-based Web content and metadata syndication format, and an application-level protocol for publishing and editing Web resources belonging to periodically updated websites. <a href="https://web.archive.org/web/20120105062737if_/http://www.atomenabled.org:80/developers/syndication/#whatIsAtom">Continue reading…</a></p>
<div><b>OPML (2000)</b></div>
<p>OPML is a text-based format designed to store and exchange outlines with attributes. It has been around since the early 2000s, and is widely used in the RSS world to exchange subscription lists. It is an established standard for interop among outliners. <a href="http://opml.org/spec2.opml">Continue reading…</a></p>
<div><b>RSS (1999)</b></div>
<p>RSS is a Web content syndication format. Its name is an acronym for Really Simple Syndication. RSS is a dialect of XML. <a href="https://www.rssboard.org/rss-specification#whatIsRss">Continue reading…</a></p>
<div><b>XSL and XSLT (1998)</b></div>
<p>XSL (Extensible Stylesheet Language) is designed for use as part of XSL, which is a stylesheet language for XML that has document manipulation capabilities beyond styling. <a href="http://xml.coverpages.org/xsl.html">Continue reading…</a></p>
</div>
<div class="decor"></div>
<div><big>✒️ <b>An appeal from the author</b></big></div>
<div class="content" id="plea">
<p>Greetings,</p>
<p>My name is Schimon Jehudah, I’m an Attorney at Law and Crypto Analyst, and author of StreamBurner News Reader (also “Newspaper” Userscript).</p>
<p>For many years, the technology generally known as RSS has been serving me and the companies I’ve been working with (financial houses and law firms) in both corporate and individual life.</p>
<p>Since its inception, advertising and media companies have been working together to eliminate this technology; mostly, by paying off software companies (namely, web browser makers) to ignore, neglect and even remove support for this technology.</p>
<p>This vital technology, which exists for over 20 years, is being oppressed for over a decade, particularly by advertising companies, news publishers, western governments and data mining websites (aka “social networks”) who want to turn more control of data flow to them and much less control to individuals, like you.</p>
<p>I advise you to share this technology with your friends and any acquaintance of yours, while at the same time, boycott media and news outlets that refuse to provide web feeds.</p>
<p><b><i>I <u>don’t</u> ask you for financial support nor monetary donations;</i></b></p>
<p><b><i>I only ask YOU to share this technology with people you know.</i></b></p>
<p>Respectfully,</p>
<p>Schimon</p>
</div>
<div><big>📜 <b>Postscript</b></big></div>
<div class="content" id="postscript">
<p>This program was made by a person who is a Lawyer and has no “formal” technical trainings nor technical qualifications, so-called, neither in CSS, ECMA (JavaScript), HTML nor XSLT technologies.</p>
<p>Since a Lawyer can make this program from scratch in 28 the days (4 hours each day), then ask yourselves “Why do web browser makers look for excuses to actively ignore this important web technology, if not because of payoffs?”</p>
</div>
<div>
StreamBurner project and source code:
<a href="https://gitgud.io/sjehuda/streamburner">gitgud.io/sjehuda/streamburner</a>
</div>
</div>`,
htmlBar =
`<div id="links-bar">
<a id="follow" title="Subscribe to get the latest updates and news">Follow</a>
<a class="cursor-pointer" id="subtome" title="Subscribe via SubToMe">SubToMe</a>
<a id="direction" title="Switch direction">Direction</a>
<a id="mode" title="Switch to dark mode">Dark View</a>
<a class="cursor-help" id="about-newspaper" title="Learn about syndication feed">Help</a>
<a class="cursor-pointer" id="donate-newspaper" title="Learn how you can support">Support</a>
</div>`,
htmlEmpty =
`<div class="notice no-entry" id="empty-feed">
<div><big><b>This news feed is empty</b></big></div>
<p>You are advised to contact the web administrators</p>
<p>and ask them to maintain “Atom” or “RSS” feeds.</p>
<!-- div>You might want to address them to <a href="https://aboutfeeds.com">aboutfeeds.com</a>.</div -->
<div class="decor"></div>
<p>Below is a contact link with possible emails;</p>
<p>Use it only in case there is no contact</p>
<p>address or form on this website.</p>
<div class="decor"></div>
</div>`,
cssFileBar = `
#links-bar {
margin: auto;
outline: .1em solid;
width: 100%;
/* max-width: 70%; */
direction: ltr;
text-align: center;
position: fixed;
top: 0;
left: 0;
right: 0;
color: WhiteSmoke;
background: #555; /* #eee */
white-space: nowrap;
overflow: scroll;
scrollbar-width: none; /* Gecko */
-ms-overflow-style: none; /* Edge */
z-index: 1;
/* border-radius: unset; */
/* border-bottom: unset; */ }
#links-bar::-webkit-scrollbar { /* Falkon and Otter */
display: none; }
#links-bar > a {
color: WhiteSmoke;
/* font-style: italic; */
font-family: system-ui; }
#links-bar > a:nth-child(1) {
/* border-left-style: unset; */
border-right-style: solid;
/* border-radius: 2em; */
color: #555;
background: WhiteSmoke;
font-weight: bold; }`,
cssFileLTR = `
html, body {
padding: 0;
margin: 0;
overflow-x: hidden; }
body {
background: WhiteSmoke;
color: #333;
hyphens: auto; }
a {
color: #333; }
#feed {
/*
width: 98%;
margin: auto;
position: relative;
overflow-x: hidden;
*/
margin: 0 -1em 1em -1em;
margin-bottom: 1em;
padding: 1em 1em 0 1em; }
#feed a {
display: inline-block; }
#logo {
display: inline-block;
float: left;
overflow: hidden;
position: relative;
height: 60px;
width: 60px;
margin-right: 9;
padding-top: 12; }
#logo > a > img {
margin: auto;
max-width: 100%;
position: absolute;
width: 5em;
bottom: 0;
right: 0;
left: 0;
top: 0; }
#title { /* TODO tag </title-page> */
font-variant: small-caps;
text-align: center;
font-weight: bold;
font-size: 3em;
margin-bottom: 0;
overflow: hidden;
-webkit-line-clamp: 2;
margin: 0; }
#title .empty:before {
font-variant: small-caps;
content: 'Streamburner News Dashboard';
text-align: center; }
#subtitle {
border-top: 1px solid;
width: 90%;
margin: auto;
overflow: hidden;
-webkit-line-clamp: 2;
white-space: wrap;
text-align: center;
font-variant: all-small-caps;
font-weight: normal;
font-size: 1.5em; }
.container {
display: flex; }
#links-bar {
/* cursor: default; */
user-select: none;
display: block;
margin: auto;
margin-bottom: 1em;
margin-top: 1em;
width: 96%;
text-align: center;
direction: ltr;
/* font-size: 90%; */
/* border-radius: 2em; */
/* border-bottom: solid; */ }
#links-bar > a {
text-decoration: none;
/* font-size: 70%; */
user-select: none;
outline: none;
min-width: 12%;
padding: 6px;
margin: 6px;
/* font-family: system-ui; */ }
#links-bar > a:hover {
opacity: 0.9; }
#links-bar > a:nth-child(1) {
/* font-weight: bold; */
cursor: pointer;
background: lavender; /* honeydew */
color: #333;
border-color: grey;
border-left-style: solid;
border-radius: 2em; /* 40% */
/*
border-top-left-radius: 2em;
border-bottom-left-radius: 2em;
*/ }
.cursor-pointer {
cursor: pointer; }
.cursor-help {
cursor: help; }
#toc {
margin-left: 5%;
margin-right: 5%;
padding: 5px; }
#toc:before {
content: 'Latest Headlines';
/* font-size: 76%; */
font-weight: bold; }
#toc > li:first-child {
margin-top: 1em; }
#toc > li > a {
text-decoration: none;
/* font-size: 66%; */
display: block;
outline: none;
padding: 5px 0;
margin-left: 1%;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
text-decoration: none; }
#toc > li > a:hover {
overflow: unset;
white-space: break-spaces;
text-decoration: underline; }
#toc > li > a:visited {
text-decoration: line-through; }
/*
#toc > a:first-child {
margin-top: 1em; }
#toc > a {
text-decoration: none;
display: list-item;
outline: none;
padding: 5px 0;
margin-left: 1%; }
#toc > a:hover {
text-decoration: underline; }
#toc > a:visited {
text-decoration: line-through; }
*/
.about-newspaper { /* overlay */
font-family: system-ui;
font-style: initial;
position: fixed;
display: none;
top: 0;
left: 0;
right: 0;
bottom: 0;
color: WhiteSmoke;
background-color: #555;
/* background-color: #ffff9b; */
z-index: 2;
overflow-y: auto;
text-align: left; /* justify */
direction: ltr;
padding: 5%;
line-height: 1.8;
font-size: 110%;
cursor: unset; }
.about-newspaper div {
margin-bottom: 1em; }
.about-newspaper a,
.category > a,
.subcategory > a {
text-decoration: none;
color: WhiteSmoke; }
.about-newspaper a:hover,
.category > a:hover,
.subcategory > a:hover {
text-decoration: underline; }
.quote {
text-align: center; /* right */
font-size: 70%;
font-style: italic;
}
.text-icon {
font-weight: bold;
background: darkorange;
border-radius: 11px;
padding-top: 3px;
padding-bottom: 3px;
padding-right: 5px;
padding-left: 5px;
user-select: none;
}
#services > a:after,
.category > a:after,
.subcategory > a:after {
content: ', '; }
#services > a:last-child:after,
.category > a:last-child:after,
.subcategory > a:last-child:after {
content: '.'; }
#filter {
/* margin-right: auto;
margin-left: auto; */
margin-top: 25px; }
.filter {
font-weight: bold;
outline: none;
user-select: none;
border-bottom: 2px solid WhiteSmoke;
background: WhiteSmoke;
color: #555;
border-radius: 5%;
/* border-bottom-right-radius: unset; */
/* border-bottom-left-radius: unset; */
margin-right: 15px;
padding: 5px;
width: 10%;
cursor: pointer; }
.hide {
display: none; }
.grey {
background: inherit;
color: inherit; }
/*
.recom {
filter: drop-shadow(2px 4px 6px pink); }
*/
.recom:before {
font-size: 80%;
content : '🔖 '; }
.category > div:first-child {
font-size: 110%;
font-weight: bold;
margin-top: 25px; }
.subcategory > div {
font-weight: bold;
/* text-decoration: underline; */ }
#postscript {
font-style: italic; }
/*
#feeds a:link {
text-decoration: none; }
*/
#feeds .category a:before {
font-size: 80%;
content: '🏷️ '; } /* 🧧 🔗 */
#articles {
justify-content: space-between;
max-width: 90%;
margin: 0 auto;
padding: 10px 0; }
#articles > * {
margin: .5em;
white-space: normal;
vertical-align: top;
margin-bottom: 50px; }
.entry {
/*border-bottom: inset;
border-bottom: groove; */
margin-left: auto;
margin-right: auto;
overflow: auto;
line-height: 1.6;
/* font-size: 85%; */
/* overflow-x: hidden; */
max-width: 98%;
/* outline: auto; */
outline: none;
padding: 4px;
/* overflow-wrap: break-word; */
word-break: break-word; }
.entry:last-child {
border-bottom: unset; }
.entry:hover {
/* background: #f8f9fa; */
/* outline: none; */ }
.entry > a {
white-space: normal; }
.decor {
/* border-top: inset; */
/* border-top: groove;
width: 30%; */
/* padding-right: 30%;
padding-left: 30%; */
margin-right: 30% !important;
margin-left: 30% !important;
padding-bottom: 1.5em !important;
text-align: center;
/* text-decoration: overline; */
user-select: none; }
.decor:after {
/* content: '∽ ✦ ∼' */
/* content: '· · ✦ · ·'; */
content: '· · • · ·'; } /* ✦ ✧ ۞ ⍟ ⍣ ✹ ✸ ✴ ✶ ✵ ✷ */
.title {
cursor: pointer;
display: inline-block;
font-size: 150%;
font-weight: bold;
text-decoration: underline;
overflow-wrap: anywhere;
/* overflow: visible;
text-overflow: ellipsis; */
font-variant: small-caps; }
/*
.title > a {
text-decoration: none; }
.title > a:hover {
text-decoration: underline; }
*/
.geolocation > a {
text-decoration: none;
padding-left: 6px; }
.author {
font-size: 75%;
margin: 0 auto 0 auto; }
.author:before {
content: 'By '; }
.author:after {
content: ' / '; }
.published, .updated {
/* font-size: 75%; */
margin: 0 auto 0 auto;
/* direction: ltr; */ }
.content {
margin: 15px auto 15px 1%;
inline-size: 95%;
text-indent: 3px; }
.content-text {
white-space: pre-wrap; }
.content[type='text'] {
font-family: monospace; }
.content * {
/* max-width: 96%; */
object-fit: contain;
height: auto; }
img, svg {
margin: 1em !important;
margin-left: 0 !important;
margin-top: 0 !important;
display: block;
/* border: 4px solid #555; */
border-radius: 0.5em;
/* min-width: 96%; */
max-width: 96%;
}
video {
border-radius: 0.5em;
outline: none;
}
iframe {
display: block;
border-radius: 0.5em;
width: 96%;
min-height: 70vw;
}
/* TODO Test <pre> */
code {
color: WhiteSmoke;
background: #555;
overflow: auto;
display: inline-flex;
max-height: 300px;
border-radius: 4px;
max-width: 100%; }
.enclosures {
background: #eee;
border: 1px solid GrayText;
border-radius: 4px;
clear: both;
color: #525c66;
cursor: help;
direction: ltr;
font-size: .8em;
margin: 5px auto 15px 1%;
padding: 15px;
vertical-align: middle;
/* border: 1px solid #aaa; */
border-radius: .5em;
max-width: 100%;
border-left: double;
padding: 1em; }
.enclosure a {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
text-decoration: none; }
.enclosure {
display: flex; }
.enclosure > a:hover {
text-decoration: underline; }
.enclosure > * {
white-space: nowrap;
margin: 3px; }
.enclosure > span:after {
content: ' (Document file) '; }
.enclosure > span[icon]:after {
content: '📄️';
margin: 3px; }
.enclosure > span.executable:after{
content: ' (Executable file) '; }
.enclosure > span[icon='executable']:after {
content: '📦️';
margin: 3px; }
.enclosure > span.image:after {
content: ' (Image file) '; }
.enclosure > span[icon='image']:after {
content: '🖼️';
margin: 3px; }
.enclosure > span.audio:after {
content: ' (Audio file) '; }
.enclosure > span[icon='audio']:after{
content: '🎼️';
margin: 3px; }
.enclosure > span.video:after {
content: ' (Video file) '; }
.enclosure > span[icon='video']:after {
content: '📽️';
margin:3px; }
.notice {
text-align: center;
display: block;
font-size: 130%;
font-weight: lighter;
font-variant-caps: all-small-caps;
color: FireBrick; }
.warning {
display: block;
font-size: 85%; /* 60 */
font-weight: bold;
color: DarkRed; }
.atom1.author:after {
content: 'Atom 1.0 Warning: Element </author> is missing'; }
.atom1.id:after {
content: 'Atom 1.0 Warning: Element </id> is missing'; }
.atom1.link:after {
content: 'Atom 1.0 Warning: Element </link> is missing'; }
.atom1.published:after {
content: 'Atom 1.0 Warning: Element </published> is missing'; }
.atom1.title:after {
content: 'Atom 1.0 Warning: Element </title> is missing'; }
.rss2.description:after {
content: 'RSS 2.0 Warning: Element </description> is missing'; }
.rss2.link:after {
content: 'RSS 2.0 Warning: Element </link> is missing'; }
.rss2.title:after {
content: 'RSS 2.0 Warning: Element </title> is missing'; }
abbr,acronym {
border-bottom: 1px dotted #c30; }
dt {
font-weight: bold; }
#about-toc {
display: grid;
/* border-bottom: inset;
text-align: right;
width: 70%;
margin-left: 30%; */ }
#about-toc > li > a {
/* display: list-item; */
display: block; }
.about-newspaper > .content {
margin-bottom: 3em;
white-space: unset; }
#info-square {
direction: ltr;
position: fixed;
margin: auto;
bottom: 0;
right: 0;
left: 0;
/* top: 33px; */
padding: 3px;
color: WhiteSmoke;
background: #555;
/* border-radius: 50px;
width: 50%;
font-size: 70%; */
/* font-style: italic; */
font-family: system-ui;
/* justify-content: center; */
align-items: center;
display: flex;
text-overflow: ellipsis;
overflow: hidden;
/* white-space: pre; in case we have html tags */
white-space: nowrap; }
#info-square > * {
color: WhiteSmoke;
margin-left : 0.5em;
margin-right : 0.5em; }
#top-navigation-button {
/* set position */
position : fixed;
bottom : 10px;
right : 20px;
z-index : 1;
/* set appearance */
background : WhiteSmoke;
color: #555;
border : 2px solid #555;
border-radius : 50px;
/* margin : 10px; */
min-width : 30px;
min-height : 30px;
font-size : 20px;
/* opacity : 0.3; */
/* center character */
justify-content : center;
align-items : center;
display : flex;
/* disable selection marks */
outline : none;
user-select : none;
/* cursor : default;
transform: rotate(-90deg) scale(1, -1); */ }
#email-link {
margin-top: 25px;
text-decoration: overline;
outline: none; }
#feed-info {
font-size : 70%;
margin-bottom : 35px;
text-align : center; }
#feed-banner {
outline: none;
display: table;
margin: auto;
/* filter: drop-shadow(2px 4px 6px black); */ }
#xslt-message {
background: indianred; /* #2c3e50 coral */
font-family: system-ui;
color: white; /* #eee navajowhite */
padding: 6px; /* 13px //15px //11px //9px //3px //1px */
display: block;
text-align: center; /* justify */
text-decoration: none;
direction: ltr; }
body.dark {
background: #333; }
code.dark,
.enclosures.dark {
background: #555; }
/* WONTFIX mainstream due to document.contentType is thought to be xml, which is not; it's html */
a.dark,
body.dark,
code.dark,
.enclosures.dark,
#empty-feed.dark {
color: WhiteSmoke; }
#links-bar > a.dark {
color: WhiteSmoke !important; }
#links-bar > a.dark:nth-child(1) {
color: #333 !important; }`,
cssFileRTL = `
html, body {
text-align: right; }
#feed {
direction: rtl; }
#logo {
float: right;
margin-left: 9; }
.geolocation > a {
padding-right: 6px; }
.image {
float: right;
margin-left: 40px;
margin-right: auto; }`;
var
cssFileBase, xmlStylesheet;
(function checkContentType() {
let myPromise = new Promise(function(myResolve, myReject) {
let request = new XMLHttpRequest();
//request.overrideMimeType('text/plain');
//request.responseType = 'text'; // ms-stream also works but both don't make a difference
request.open('GET', document.documentURI);
//request.setRequestHeader('Content-Type', 'text/plain;charset=UTF-8');
//request.setRequestHeader('Content-Type', 'text/plain');
request.onload = function() {
if (document.URL.startsWith('file:') ||
request.status == 200) {
myResolve(request);
}
else {
myReject("File not Found");
}
};
request.send();
/* gmXmlhttpRequest({
method: 'GET',
url: document.documentURI,
headers: {
"Content-Type": "text/plain",
"Accept": "text/plain"
},
onprogress: function(request) {
request.responseType = 'text';
},
onload: function(request) {
request.overrideMimeType = 'text/plain';
if (document.URL.startsWith('file:') ||
request.status == 200) {
myResolve(request);
}
else {
myReject("File not Found");
}
},
onerror: function(request) {
myReject('File not Found')
}
}) */
});
myPromise.then(
function(request) {
/*
if (request.response.toLowerCase().includes('<?xml-stylesheet')) {
// Apparently, this program doesn't influence server stylesheet
// This if statement is useful to save CPU and RAM resources.
// NOTE We can remove it using DOMParser.
return; // exit
}
*/
let xmlFile
let domParser = new DOMParser();
xmlFile = domParser.parseFromString(request.response.trim(), 'text/xml');
// TODO Preference to respect or override stylesheet
// TODO Ignore all stylesheets if all are CSS
// TODO Infobar suggesting to render with Streamburner ?streamburner=1
// TODO Infobar suggesting to disable (watch without) Streamburner ?streamburner=0 <-- do this
if (xmlFile) {
//let xmlStylesheet;
for (childNode of xmlFile.childNodes) {
if (childNode.target == 'xml-stylesheet') {
childNode.remove();
xmlStylesheet = true;
//return; // exit
}
}
/*
// TODO Configuration to override existing stylesheet
if (override) {
if (xmlFile.firstChild.nodeName == "xml-stylesheet") {
console.log(xmlFile.firstChild)
xmlFile.firstChild.remove();
}
} else {
return; // exit
}
*/
/*
// Remove node of type comment
// Because of this code below
if (xmlFile.childNodes[0] == xmlFile.querySelector('feed')) {
while (xmlFile.firstChild.nodeName == '#comment') {
xmlFile.firstChild.remove(); // xmlFile.childNodes[0]
}
}
*/
/*
// Remove all nodes of type comment
nodeIterator = xmlDoc.createNodeIterator(
xmlDoc, // Starting node, usually the document body
NodeFilter.SHOW_ALL, // NodeFilter to show all node types
null,
false
);
let currentNode;
// Loop through each node in the node iterator
while (currentNode = nodeIterator.nextNode()) {
// Do something with each node
console.log(currentNode.nodeName);
}
*/
// <feed xmlns="http://www.w3.org/2005/Atom">
// xmlFile.getElementsByTagNameNS('http://www.w3.org/2005/Atom','feed')
if (xmlFile.firstElementChild == xmlFile.querySelector('feed')) {
pageLoader();
renderXML(xmlFile, atomRules);
extensionLoader(
// NOTE This && is an if statement
xmlFile.querySelector('feed > link') && xmlFile.querySelector('feed > link').href,
getDateXML(xmlFile, atomRules),
'Atom' // Atom Web Feed 1.0
);
} else
// Netscape RSS 0.91 <!DOCTYPE rss SYSTEM "http://my.netscape.com/publish/formats/rss-0.91.dtd">
// Userland RSS 0.91 <rss version="0.91">
// RSS 0.92 <rss version="0.92">
// RSS 0.93 <rss version="0.93">
// RSS 0.94 <rss version="0.94">
// RSS 2.0 <rss version="2.0">
if (xmlFile.firstElementChild == xmlFile.querySelector('rss')) {
pageLoader();
renderXML(xmlFile, rssRules);
extensionLoader(
// NOTE This && is an if statement
xmlFile.querySelector('channel > link') && xmlFile.querySelector('channel > link').href,
// FIXME
// https://www.elegislation.gov.hk/verified-chapters!en.rss.xml
getDateXML(xmlFile, rssRules),
'RSS' // RSS Web Feed 2.0
);
} else
// TODO Check by namespace xmlns
// https://wiki.gnome.org/action/rss_rc/Home?action=rss_rc&unique=1&ddiffs=1
// http://purl.org/rss/1.0/
// https://web.resource.org/rss/1.0/schema.rdf
// RSS 0.90 <rdf:RDF xmlns="http://my.netscape.com/rdf/simple/0.9/">
// RSS 1.0 <rdf:RDF xmlns="http://purl.org/rss/1.0/">
// NOTE firstElementChild test page https://web.resource.org/rss/1.0/
// xmlFile.getElementsByTagNameNS('http://www.w3.org/1999/02/22-rdf-syntax-ns#', 'RDF');
if (xmlFile.firstElementChild == xmlFile.getElementsByTagName("rdf:RDF")[0]) {
pageLoader();
renderXML(xmlFile, rdfRules);
extensionLoader(
null,
getDateXML(xmlFile, rdfRules),
'RDF Vocabulary' // RSS Web Feed 1.0
);
}
// TODO
// This appears to be a not usuable Atom feed
// Either make it usable or invalidate it
// https://dbpedia.org/data/Searx.atom
}
// Information of request
//console.info(xmlFile);
//console.info(document);
//console.info(`all headers: ${request.getAllResponseHeaders()}`);
//console.info(`content-type header: ${request.getResponseHeader('content-type')}`);
//console.info(`content-type document: ${document.contentType}`);
// errorPage is a good idea to promote Falkon
//setTimeout(function(){renderFeed(request.response)}, 1500); // timeout for testing
try {
if (JSON.parse(request.response)) {
let jsonFile = JSON.parse(request.response);
if (jsonFile.version) {
if (jsonFile.version.toLowerCase().includes('jsonfeed.org')) {
pageLoader();
//setTimeout(function(){renderJSONFeed(jsonFile)}, 1500);
renderJSONFeed(jsonFile);
extensionLoader(
jsonFile.feed_url,
jsonFile.items[0].date_published,
// jsonFile.items[0].date_modified,
'JSON Feed'
);
}
} else
if (jsonFile.generator) {
if (jsonFile.generator.toLowerCase().includes('statusnet') || // TODO Case insensitive
jsonFile.generator.toLowerCase().includes('gnu social')) {
pageLoader();
renderActivityStream(jsonFile);
extensionLoader(
null,
jsonFile.items[0].published,
'ActivityStream'
);
}
}
// TODO ActivityStream
// https://nu.federati.net/api/statuses/show/3424682.json
}
} catch {
// Not JSON
}
}
);
})();
/*
Test code (attempting to modify content type):
console.info(document);
request = new XMLHttpRequest();
// "false" is only used for this test
request.open('GET', document.documentURI, false);
request.overrideMimeType('text/plain');
request.setRequestHeader('content-type', 'text/plain');
request.send();
//console.info(request.response);
console.info(`all headers: ${request.getAllResponseHeaders()}`);
console.info(`content-type header:
${request.getResponseHeader('content-type')}`);
console.info(`content-type document: ${document.contentType}`);
*/
/*
(function checkContentType() {
fetch(
document.documentURI,
{
method: 'GET',
headers: {
"Content-Type" : "text/plain",
},
}
)
.then((response) => {
console.info(response.headers.get('content-type'))
//console.info(response.arrayBuffer())
return response.arrayBuffer();
})
.then((data) => {
let decoder = new TextDecoder(document.characterSet);
let text = decoder.decode(data);
domParser = domParser = new DOMParser();
try {
if (JSON.parse(text)) {
jsonFile = JSON.parse(text);
if (jsonFile.version) {
if (jsonFile.version.toLowerCase().includes('jsonfeed.org')) {
renderJSONFeed(jsonFile);
extensionLoader(jsonFile.feed_url); // , jsonFile, 'JSON'
}
} else
if (jsonFile.generator) {
if (jsonFile.generator.toLowerCase().includes('statusnet') || // TODO Case insensitive
jsonFile.generator.toLowerCase().includes('gnu social')) {
renderActivityStream(jsonFile);
extensionLoader(); // null, jsonFile, 'ActivityStream'
}
}
}
} catch {
if (domParser.parseFromString(text, 'text/xml')) {
xmlFile = domParser.parseFromString(text, 'text/xml');
// errorPage is a good idea to promote Falkon
if (xmlFile.querySelector('feed')) {
renderXML(xmlFile, atomRules);
extensionLoader(xmlFile.querySelector('feed > link').href); // , xmlFile, 'Atom'
} else
if (xmlFile.querySelector('rss')) {
renderXML(xmlFile, rssRules);
extensionLoader(xmlFile.querySelector('channel > link').href); // , xmlFile, 'RSS'
}
}
}
});
})();
*/
function renderActivityStream(jsonFile) {
let newDocument = createPage();
newDocument.title = jsonFile.title;
if (jsonFile.language) {
newDocument
.documentElement
.setAttribute('lang', jsonFile.language);
}
let feed = newDocument.createElement('div');
feed.id = 'feed';
let title = newDocument.createElement('div');
if (jsonFile.title) {
title.textContent = jsonFile.title;
} else {
title.textContent = defaultTitle;
}
title.id = 'title';
feed.append(title);
let subtitle = newDocument.createElement('div');
if (jsonFile.description) {
subtitle.textContent = jsonFile.description;
} else {
subtitle.textContent = defaultSubtitle;
}
subtitle.id = 'subtitle';
feed.append(subtitle);
let toc = newDocument.createElement('ol');
toc.id = 'toc';
feed.append(toc);
let articles = newDocument.createElement('div');
articles.id = 'articles';
feed.append(articles);
if (jsonFile.items.length) {
for (const item of jsonFile.items) {
//for (let i = 0; i < jsonFile.items.length; i++) {
let index = jsonFile.items.indexOf(item) + 1;
let titleToc = newDocument.createElement('a');
// /questions/5002111/how-to-strip-html-tags-from-string-in-javascript
titleToc.textContent =
item
.content
.replace(/(<([^>]+)>)/gi, "");
//titleToc.textContent = item.actor.portablecontacts_net.preferredUsername;
titleToc.href = `#newspaper-oujs-${index}`;
let liElement = newDocument.createElement('li');
liElement.append(titleToc)
toc.append(liElement);
let entry = newDocument.createElement('div');
entry.className = 'entry';
let link = newDocument.createElement('a');
link.textContent =
item
.actor
.portablecontacts_net.preferredUsername;
link.href = item.url;
//link.id = item.id;
link.id = `newspaper-oujs-${index}`;
title = newDocument.createElement('div');
title.className = 'title';
title.append(link);
entry.append(title);
let date = newDocument.createElement('div');
date.className = 'published';
date.textContent = item.published;
entry.append(date);
if (item.image) {
let image = newDocument.createElement('img');
image.src = item.actor.image;
entry.append(image);
}
let text = newDocument.createElement('div');
text.className = 'content';
text.innerHTML = item.content;
entry.append(text);
articles.append(entry);
if (index > 19) {
break;
}
}
} else {
toc.remove();
articles
.insertAdjacentHTML('beforeend', htmlEmpty);
}
newDocument.body.append(feed);
newDocument = checkContentEmptiness(newDocument);
placeNewDocument(newDocument);
}
function renderJSONFeed(jsonFile) {
let feedMap = {
"title": "title",
"subtitle": "description",
"language" : "language",
"item": [{
"title" : "title",
"url" : ["url", "id"],
"content" : ["content_html", "content_text"],
"image" : "image",
"date" : ["date_published", "date_modified"],
"authors" : ["authors", "author"],
"tags" : "tags",
"language" : "language",
"id" : "id",
}],
"attachments": [{
"url" : "url",
"mime_type" : "mime_type",
"title" : "title",
"size_in_bytes" : "size_in_bytes",
"duration_in_seconds" : "duration_in_seconds"
}],
"homepage": "home_page_url",
"version": "version",
"url": "feed_url"
};
let newDocument = createPage();
/*
newDocument = domParser.parseFromString('<html></html>', 'text/html');
elements = ['html', 'head', 'body'];
//for (const element of elements) {
for (let i = 1; i < elements.length; i++) {
element = newDocument.createElement(elements[i]);
newDocument.documentElement.append(element);
}
*/
newDocument.title = jsonFile.title;
if (jsonFile.language) {
newDocument
.documentElement
.setAttribute('lang', jsonFile.language);
}
let feed = newDocument.createElement('div');
feed.id = 'feed';
let title = newDocument.createElement('div');
if (jsonFile.title) {
title.textContent = jsonFile.title;
} else {
title.textContent = defaultTitle;
}
title.id = 'title';
feed.append(title);
let subtitle = newDocument.createElement('div');
if (jsonFile.description) {
subtitle.textContent = jsonFile.description;
} else {
subtitle.textContent = defaultSubtitle;
}
subtitle.id = 'subtitle';
feed.append(subtitle);
let toc = newDocument.createElement('ol');
toc.id = 'toc';
feed.append(toc);
let articles = newDocument.createElement('div');
articles.id = 'articles';
feed.append(articles);
/* FIXME
These couple of for-loops don't work
Failing part: jsonFile.cellOfArray
Uncaught (in promise) TypeError: Cannot read property '0' of undefined
tags = ['title', 'description'];
for (const tag of tags) {
element = newDocument.createElement('div');
element.textContent = jsonFile.tag;
element.id = tag;
feed.append(element);
}
elements = ['title', 'description'];
for (let i = 0; i < elements.length; i++) {
element = newDocument.createElement('div');
element.textContent = jsonFile.elements[i];
element.id = elements[i];
feed.append(element);
}
*/
if (jsonFile.items.length) {
for (const item of jsonFile.items) {
//for (let i = 0; i < jsonFile.items.length; i++) {
let index = jsonFile.items.indexOf(item) + 1;
let titleToc = newDocument.createElement('a');
if (item.title) {
titleToc.textContent = item.title;
} else if (item.content_text) {
titleToc.textContent = item.content_text;
} else if (item.content_html) {
titleToc.textContent =
item
.content_html
.replace(/(<([^>]+)>)/gi, "");
} else {
titleToc.textContent = '*** No Title ***';
}
titleToc.href = `#newspaper-oujs-${index}`;
let liElement = newDocument.createElement('li');
liElement.append(titleToc)
toc.append(liElement);
let entry = newDocument.createElement('div');
entry.className = 'entry';
let link = newDocument.createElement('a');
if (item.title) {
link.textContent = item.title;
} else {
link.textContent = 'No Title';
}
link.href = item.url;
//link.id = item.id;
link.id = `newspaper-oujs-${index}`;
title = newDocument.createElement('div');
title.className = 'title';
title.append(link);
entry.append(title);
let date = newDocument.createElement('div');
date.className = 'published';
date.textContent = item.date_published; // date_modified
entry.append(date);
// TODO Set it as enclosure unless content is not html (i.e. is text)
if (item.image) {
let image = newDocument.createElement('img');
image.src = item.image;
entry.append(image);
}
let text = newDocument.createElement('div');
text.className = 'content';
text.innerHTML = item.content_html; // content_text
entry.append(text);
articles.append(entry);
if (index > 19) {
break;
}
}
} else {
toc.remove();
articles.insertAdjacentHTML('beforeend', htmlEmpty);
}
newDocument.body.append(feed);
newDocument = checkContentEmptiness(newDocument);
placeNewDocument(newDocument);
}
function renderXML(xmlFile, xmlRules) {
let newDocument = createPage();
newDocument.title =
xmlFile
.querySelector(xmlRules.feedTitlePage)
.textContent;
if (xmlFile.querySelector(xmlRules.feedLanguage)) {
let language;
if (xmlFile.querySelector(xmlRules.feedLanguage).getAttribute('xml:lang')) { // Atom
language =
xmlFile
.querySelector(xmlRules.feedLanguage)
.getAttribute('xml:lang');
} else {
language =
xmlFile
.querySelector(xmlRules.feedLanguage)
.textContent;
}
newDocument.documentElement.setAttribute('lang', language);
}
let feed = newDocument.createElement('div');
feed.id = 'feed';
let title = newDocument.createElement('div');
if (xmlFile.querySelector(xmlRules.feedTitlePage)) {
title.textContent =
xmlFile
.querySelector(xmlRules.feedTitlePage)
.textContent;
}
if (!title.textContent) {
title.textContent = defaultTitle;
}
title.id = 'title';
feed.append(title);
let subtitle = newDocument.createElement('div');
if (xmlFile.querySelector(xmlRules.feedSubtitle)) {
subtitle.textContent =
xmlFile
.querySelector(xmlRules.feedSubtitle)
.textContent
.replace(/(<([^>]+)>)/gi, "");
}
if (!subtitle.textContent) {
subtitle.textContent = defaultSubtitle;
}
subtitle.id = 'subtitle';
feed.append(subtitle);
let toc = newDocument.createElement('ol');
toc.id = 'toc';
feed.append(toc);
let articles = newDocument.createElement('div');
articles.id = 'articles';
feed.append(articles);
if (xmlFile.querySelectorAll(xmlRules.feedItem).length) {
for (const item of xmlFile.querySelectorAll(xmlRules.feedItem)) {
let index = Array.from(xmlFile.querySelectorAll(xmlRules.feedItem)).indexOf(item) + 1;
let titleToc = newDocument.createElement('a');
// /questions/5002111/how-to-strip-html-tags-from-string-in-javascript
if (item.querySelector(xmlRules.feedItemTitle) &&
item.querySelector(xmlRules.feedItemTitle).textContent.length) { // FIXME there are two of the same
titleToc.textContent =
item
.querySelector(xmlRules.feedItemTitle)
.textContent;
//titleToc.textContent =
titleToc.innerHTML =
titleToc
.textContent
.replace(/(<([^>]+)>)/gi, "");
} else
if (item.querySelector(xmlRules.feedItemContent) &&
item.querySelector(xmlRules.feedItemContent).textContent) {
titleToc.textContent =
item
.querySelector(xmlRules.feedItemContent)
.textContent
.replace(/(<([^>]+)>)/gi, "");
} else {
titleToc.textContent = '*** No Title ***';
}
titleToc.href = `#newspaper-oujs-${index}`;
let liElement = newDocument.createElement('li');
liElement.append(titleToc)
toc.append(liElement);
let entry = newDocument.createElement('div');
entry.className = 'entry';
let link = newDocument.createElement('a');
link.id = `newspaper-oujs-${index}`;
if (item.querySelector(xmlRules.feedItemTitle) &&
item.querySelector(xmlRules.feedItemTitle).textContent.length) { // FIXME there are two of the same
//link.textContent =
link.innerHTML =
item
.querySelector(xmlRules.feedItemTitle)
.textContent
.replace(/(<([^>]+)>)/gi, "");
} else {
link.textContent = 'No Title';
}
if (item.querySelector(xmlRules.feedItemLink) &&
item.querySelector(xmlRules.feedItemLink).textContent.length) {
// rss
link.href =
item
.querySelector(xmlRules.feedItemLink)
.textContent;
} else
if (item.querySelector(xmlRules.feedItemLink) &&
item.querySelector(xmlRules.feedItemLink).getAttribute('href')) {
// atom
if (item.querySelector(xmlRules.feedItemLink + "[rel='alternate']")) {
link.href =
item
.querySelector(xmlRules.feedItemLink + "[rel='alternate']")
.getAttribute('href');
} else {
link.href =
item
.querySelector(xmlRules.feedItemLink)
.getAttribute('href');
}
} else {
link.href = './?ref=feed';
}
title = newDocument.createElement('div');
title.className = 'title';
title.append(link);
entry.append(title);
if (item.querySelector(xmlRules.feedItemDate)) {
let date = newDocument.createElement('div');
date.className = 'published';
date.textContent =
item
.querySelector(xmlRules.feedItemDate)
.textContent;
entry.append(date);
}
if (item.querySelector(xmlRules.feedItemContent)) {
let text = newDocument.createElement('div');
text.className = 'content content-text';
text.innerHTML =
item
.querySelector(xmlRules.feedItemContent)
.textContent;
if (/<\/?[a-z][\s\S]*>/i.test(text.innerHTML)) {
text.className = 'content';
}
entry.append(text);
}
if (item.querySelector(xmlRules.feedItemSummary)) {
let text = newDocument.createElement('div');
text.className = 'content content-text';
text.innerHTML =
item
.querySelector(xmlRules.feedItemSummary)
.textContent;
if (/<\/?[a-z][\s\S]*>/i.test(text.innerHTML)) {
text.className = 'content';
}
entry.append(text);
}
if (item.querySelector(xmlRules.feedItemEnclosure)) {
let enclosures = newDocument.createElement('div');
enclosures.className = 'enclosures';
enclosures.title = 'Right-click and Save link as…';
for (const enclosure of item.querySelectorAll(xmlRules.feedItemEnclosure)) {
let file = newDocument.createElement('div');
file.className = 'enclosure';
enclosures.append(file);
let icon = newDocument.createElement('span');
let documentType;
if (enclosure.getAttribute('type')) {
documentType = enclosure.getAttribute('type').split('/')[0];
} else {
documentType = '';
}
icon.setAttribute('icon', documentType);
file.append(icon);
let link = newDocument.createElement('a');
let enclosureBase, enclosureUrl;
if (enclosure.getAttribute('url')) { // rss
enclosureUrl = enclosure.getAttribute('url');
enclosureBase = enclosureUrl.split('/').pop();
} else
if (enclosure.getAttribute('href')) { // atom https://tomosnowbug.hatenablog.com/feed
enclosureUrl = enclosure.getAttribute('href');
enclosureBase = enclosureUrl.split('/').pop();
}
link.textContent = enclosureBase;
link.download = enclosureBase;
link.href = enclosureUrl;
file.append(link);
let size = newDocument.createElement('span');
// class="size" is needed for function transformFileSize
size.className = `size ${documentType}`;
size.textContent = `${enclosure.getAttribute('length')}`;
file.append(size);
}
entry.append(enclosures);
}
articles.append(entry);
if (index > 19) {
break;
}
}
}
newDocument.body.append(feed);
newDocument = checkContentEmptiness(newDocument);
placeNewDocument(newDocument);
}
function createPage() {
let domParser = new DOMParser();
let newDocument =
domParser
.parseFromString('', 'text/html');
return newDocument;
}
function checkContentEmptiness(newDocument) {
if (newDocument.getElementsByClassName('entry').length == 1) {
newDocument.getElementById('toc').remove();
// NOTE https://dbpedia.org/data/Searx.atom
if (!newDocument.getElementById('articles').outerText) {
newDocument.getElementsByClassName('entry')[0].remove();
// Should removed data be added to the htmlEmpty message?
// newDocument.getElementsByClassName('entry')[0].outerHTML;
newDocument.getElementById('articles')
.insertAdjacentHTML('beforeend', htmlEmpty);
}
} else
if (newDocument.getElementsByClassName('entry').length == 0) {
newDocument.getElementById('toc').remove();
newDocument.getElementById('articles')
.insertAdjacentHTML('beforeend', htmlEmpty);
}
return newDocument;
}
// Possible solution for the document.contentType issue
// /questions/40201137/i-need-to-read-a-text-file-from-a-javascript
// https://openuserjs.org/garage/Loading_functions_after_document_is_replaced_by_new_document
function placeNewDocument(newDocument) {
// Failed attempt to force web browser to treat file as HTML
var meta = newDocument.createElement('meta');
meta.setAttribute('http-equiv', 'Content-Type');
meta.setAttribute('content', 'text/html; charset=utf-8');
// Append the <meta> element to the <head> element
newDocument.head.appendChild(meta);
// Failed attempt to force web browser to treat file as HTML
newDocument = purgeStylesheets(newDocument); // FIXME
newDocument = setCssStylesheet(newDocument); // FIXME
if (xmlStylesheet) {
stylesheetMessage(newDocument)
}
//var newDoc = document.adoptNode(newDoc.documentElement, true);
let insertDocument =
document
.importNode(
newDocument
.documentElement,
true
);
let removeDocument =
document
.documentElement;
document
.replaceChild(
insertDocument,
removeDocument
);
}
// TODO
// The following events don't work on some pages: https://momi.ca/feed.xml
// Perhaps, confine them to some type of window.onload = (event) => { CODE }
function extensionLoader(url, date, type) {
// /questions/381744/is-there-anyway-to-change-the-content-type-of-an-xml-document-in-the-xml-docume
// /questions/23034283/is-it-possible-to-use-htmls-queryselector-to-select-by-xlink-attribute-in-an
//purgeStylesheets(); // FIXME
//setCssStylesheet(); // FIXME
scrollDown();
decorateEntry();
linksBar();
follow(url);
subToMe(url);
dark();
toggleMode();
direction();
//setBanner();
//truncateToc();
feedInfo(date, type);
formatDate();
aboutPage();
donatePage();
settleFilters();
statusBar();
mailTo();
//geckoHelp();
setNonceUponCSP();
transformFileSize();
trimEnclosureFilename();
}
function trimEnclosureFilename() {
for (const fileName of document.querySelectorAll('.enclosure > a')) {
if (fileName.textContent.includes('?')) {
//let newfileName;
//newfileName = fileName.href.split('/').pop();
//newfileName = newfileName.substring(0, newfileName.indexOf('?'));
let newfileName = fileName.textContent.substring(0, fileName.textContent.indexOf('?'));
fileName.textContent = newfileName;
fileName.download = newfileName;
fileName.href = newfileName;
}
}
}
// questions/10420352/converting-file-size-in-bytes-to-human-readable-string
function transformFileSize() {
for (const item of document.querySelectorAll('.size')) {
size = item.textContent;
var i = size == 0 ? 0 : Math.floor(Math.log(size) / Math.log(1024));
item.textContent = (size / Math.pow(1024, i)).toFixed(2) * 1 + ' ' + ['B', 'kB', 'MB', 'GB', 'TB'][i];
if (item.textContent == '0 B' ||
item.textContent == 'NaN undefined') {
item.textContent = null;
}
}
}
function truncateToc() {
for (const titleToc of document.querySelectorAll('#toc > li > a')) {
if (titleToc.textContent.length > 70) {
titleToc.title = titleToc.textContent;
titleToc.textContent =
titleToc
.textContent
.substring(0, 70) + ' […]';
}
}
}
function stylesheetMessage(document) {
let aElement = document.createElement('a');
document.body.prepend(aElement);
//aElement.href = location.href.substring(0, location.href.indexOf('#')) + location.search + '?streamburner=0';
let url = new URL(location.href);
url.searchParams.set('streamburner','0');
aElement.href = url.href;
aElement.innerHTML = 'View this feed with its own stylesheet'; // This feed has its own stylesheet
aElement.id = 'xslt-message';
}
// FIXME https://lw1.at/en/postfeed.xml
function getDateXML(xmlFile, xmlRules) {
if (xmlFile.querySelector(xmlRules.feedDate)) {
date = xmlFile.querySelector(xmlRules.feedDate).textContent;
} else
if (xmlFile.querySelector(xmlRules.feedItemDate)) {
date = xmlFile.querySelector(xmlRules.feedItemDate).textContent;
} else {
return null;
}
return date;
}
function setBanner() {
let aElement = document.createElement('a');
aElement.href = 'https://www.falkon.org/?ref=newspaper';
aElement.id = 'feed-banner';
document.body.append(aElement);
aElement.insertAdjacentHTML('beforeend', banner);
}
function feedInfo(date, type) {
let divElement = document.createElement('div');
divElement.id = 'feed-info';
// TODO Add "generated by" and also add to meta
if (date) {
divElement.innerHTML = `${type} syndication updated at <span class="published">${date}</span>`;
} else {
divElement.innerHTML = `${type} syndication`;
}
document.body.append(divElement);
}
function decorateEntry() {
for (const entry of document.querySelectorAll('.entry')) {
let divElement = document.createElement('div');
divElement.className = 'decor';
entry.parentNode.insertBefore(divElement, entry.nextSibling);
}
}
function formatDate() {
let elements = ['.published', '.updated'];
for (let i = 0; i < elements.length; i++) {
for (const element of document.querySelectorAll(elements[i])) {
let date = new Date(element.textContent);
//element.textContent = date.toDateString();
element.textContent = date.toLocaleString();
}
}
}
function setCssStylesheet(document) {
let cssStylesheet = document.createElement('style');
document.head.append(cssStylesheet);
//stylesheet.setAttribute('crossorigin', 'anonymous');
cssStylesheet.type = 'text/css';
cssStylesheet.id = namespace;
// TODO
// Set direction by the letters of the initial set of words
// if no language specified.
if (rtlLocales.includes(document.documentElement.getAttribute('lang'))) {
cssFileBase = cssFileLTR + cssFileRTL;
} else {
cssFileBase = cssFileLTR;
}
cssStylesheet.textContent = cssFileBase;
//cssStylesheet.setAttribute('unsafe-hashes', null);
return document; // FIXME
}
// FIXME
// Blocked due to server policy
// https://archlinux.org/feeds/packages/
// https://www.openstreetmap.org/traces/rss
// https://artemislena.eu/feed.json
// NOTE
// Consider https://openuserjs.org/libs/BigTSDMB/setStyle
function setNonceUponCSP() {
window.addEventListener("securitypolicyviolation", (e) => {
//let message = e.originalPolicy;
//messageTruncated = message.substring(message.indexOf("'nonce-") + 7);
//let nonceValue = messageTruncated.substring(0, messageTruncated.indexOf("'"));
cssStylesheet = document.getElementById(namespace);
let nonceValue = e.originalPolicy.match(/'nonce-(.*?)'/)[1];
cssStylesheet.setAttribute('nonce', nonceValue);
//let hashValue = e.originalPolicy.match(/sha256-[A-Za-z0-9+/=]+/)[0];
//cssStylesheet.setAttribute('unsafe-inline', hashValue);
// Reload stylesheet
textContent = cssStylesheet.textContent;
cssStylesheet.textContent = null;
cssStylesheet.textContent = textContent;
}, { passive : true, });
}
// NOTE
// https://momi.ca/feed.xml
// https://momi.ca/css/base.css
// https://momi.ca/css/dark.css
function purgeStylesheets(document) {
for (const style of document.querySelectorAll('link[rel="stylesheet"]')) {
style.remove();
}
return document; // FIXME
}
function follow(url) {
let flw = document.querySelector('#follow');
if (url) {
flw.href = `feed:${url}`;
} else {
flw.href = `feed:${location.href}`;
}
/*
flw.addEventListener ("click", function() {
if (url) {
location.href = `feed:${url}`;
} else {
location.href = `feed:${location.href}`;
}
});
*/
}
function subToMe(url) {
let stm = document.querySelector('#subtome');
//stm.href = `https://www.subtome.com/#/subscribe?feeds=${url}`;
stm.addEventListener ("click", function() {
(function(btn){
let z = document.createElement("script");
document.subtomeBtn = btn;
z.src = "https://www.subtome.com/load.js";
document.body.appendChild(z);
})(stm);
return false;
});
}
async function dark() {
cssSelectors = [
'body', 'code', 'a', '.enclosures', '#empty-feed'];
if (await GM.getValue('dark')) {
for (cssSelector of cssSelectors) {
for (element of document.querySelectorAll(cssSelector)) {
element.classList.add('dark');
let mode = document.querySelector('#mode');
mode.textContent = 'Light View';
mode.title = 'Set view mode: Bright';
}
}
}
}
function toggleMode() {
let mode = document.querySelector('#mode');
cssSelectors = [
'body', 'code', 'a', '.enclosures', '#empty-feed'];
mode.addEventListener ("click", async function() {
if (await GM.getValue('dark')) {
await GM.setValue('dark', false);
mode.textContent = 'Dark View';
mode.title = 'Set view mode: Dark';
infoSquare('Set view mode: Dark');
for (cssSelector of cssSelectors) {
for (element of document.querySelectorAll(cssSelector)) {
element.classList.remove('dark');
}
}
} else {
await GM.setValue('dark', true);
mode.textContent = 'Light View';
mode.title = 'Set view mode: Bright';
infoSquare('Set view mode: Bright');
for (cssSelector of cssSelectors) {
for (element of document.querySelectorAll(cssSelector)) {
element.classList.add('dark');
}
}
}
});
}
/*
function toggleMode() {
let mode = document.querySelector('#mode');
mode.addEventListener ("click", function() {
cssSelectors = [
'body', 'code', 'a', '.enclosures', '#empty-feed'];
for (cssSelector of cssSelectors) {
for (element of document.querySelectorAll(cssSelector)) {
//element.style.color = 'WhiteSmoke';
element.classList.toggle('dark');
}
}
if (document.querySelector('body.dark')) {
mode.textContent = 'Light View';
mode.title = 'Switch to bright mode';
} else {
mode.textContent = 'Dark View';
mode.title = 'Switch to dark mode';
}
//document.querySelector('#links-bar > a:nth-child(1)').style.color = '#333';
//document.body.style.background = '#333';
});
}
*/
function direction() {
let dire = document.querySelector('#direction');
dire.addEventListener ("click", function() {
if (document.dir == 'ltr' || !document.dir) {
document.dir = 'rtl';
dire.title = 'Set direction: Left-to-right';
infoSquare('Set direction: Left-to-right');
} else {
document.dir = 'ltr';
dire.title = 'Set direction: Right-to-left';
infoSquare('Set direction: Right-to-left');
}
});
}
function linksBar() {
let divElement = document.createElement('div');
divElement.innerHTML = htmlBar;
let subtitle = document.querySelector('#subtitle');
subtitle.parentNode.insertBefore(divElement, subtitle.nextSibling);
}
function aboutPage() {
document.body.insertAdjacentHTML('beforeend', htmlAbout);
let btn = document.querySelector('#about-newspaper');
btn.addEventListener ("click", function() {
document
.querySelector('#about-feed')
.style
.display = 'block';
});
// freedos at sourceforge won't allow inline ondblclick
// ondblclick="this.style.display = "none""
let dia = document.querySelector('#about-feed');
dia.addEventListener ("dblclick", function() {
document
.querySelector('#about-feed')
.style
.display = 'none';
});
}
function donatePage() {
document.body.insertAdjacentHTML('beforeend', htmlDonate);
let btn = document.querySelector('#donate-newspaper');
btn.addEventListener ("click", function() {
document
.querySelector('#about-donate')
.style
.display = 'block';
});
// freedos at sourceforge won't allow inline ondblclick
// ondblclick="this.style.display = "none""
let dia = document.querySelector('#about-donate');
dia.addEventListener ("dblclick", function() {
document
.querySelector('#about-donate')
.style
.display = 'none';
});
}
// TODO Use this function and incorporate it with function mailTo()
function emptyPage() {
document
.querySelector('#articles')
.insertAdjacentHTML('beforeend', htmlEmpty);
}
function mailTo() {
// Add link with emails
if (document.querySelector('#empty-feed')) {
let ele, eml, hyl;
ele = document.querySelector('#empty-feed');
aElement = document.createElement('a');
aElement.id = 'email-link';
aElement.textContent = 'Contact Webmaster';
let una = ['admin', 'contact', 'form', 'hello',
'hi', 'info', 'office', 'pr', 'press',
'support', 'web', 'webmaster',];
hyl = `${una[0]}@${location.hostname},`
for (let i = 1; i < una.length; i++) {
hyl += `${una[i]}@${location.hostname},`;
}
//hyl = hyl.slice(0. -1);
aElement.href = `mailto:?subject=Web Feeds for ${location.hostname}&body=Hello,%0D%0A%0D%0AThis is an automated message.%0D%0A%0D%0APlease add Web Feeds (aka RSS) to your website, so that people can easily receive updates from your website.%0D%0A%0D%0AIf you do not know what a Web Feed is or how you can benefit from it, visit aboutfeeds.com to read about it.%0D%0A%0D%0AKind regards,%0D%0A&bcc=${hyl}`
ele.append(aElement);
}
}
function settleFilters() {
// Hide all links to software that are not of news
for (const element of document.querySelectorAll('#software a')) {
//if (element.className != 'news') {
if (!element.className.includes('news')) {
element.classList.toggle('hide');
}
}
// Create toggle mechanism
for (const element of document.querySelectorAll('.filter')) { // #filter > span
if (element.id != 'news') {
element.classList.toggle('grey');
}
element.addEventListener ("click", function() {
element.classList.toggle('grey');
for (const span of document.querySelectorAll(`.${element.id}`)) {
span.classList.toggle('hide');
}
});
}
}
function statusBar() {
// Display entry title in status bar
for (const element of document.querySelectorAll('.entry')) {
element.addEventListener ("mouseover", function() {
infoSquare(`${this.querySelector('.title > a').textContent}`);
});
}
// Prepare links to be used with status bar
for (const element of document.querySelectorAll('#links-bar > a')) {
element.addEventListener ("mouseover", function() {
//infoSquare(this.title);
if (this.title) {
this.setAttribute('info', this.title);
this.removeAttribute('title');
}
//infoSquare(`<b>Info: </b> ${this.getAttribute('info')}`);
infoSquare(`${this.getAttribute('info')}`);
});
}
// Remove status bar
for (const element of document.querySelectorAll('#links-bar')) {
//for (const element of document.querySelectorAll('#links-bar > a')) {
element.addEventListener ("mouseleave", function() { // mouseout
if (document.querySelector('#info-square')) {
document.querySelector('#info-square').remove();
}
});
}
}
function floatBar() {
const cssStylesheet = document.getElementById(namespace);
if (document.querySelector('#links-bar')) {
document.querySelector('#links-bar').style.display = 'auto';
}
if (window.pageYOffset > 300) { // TODO when first entry is focused
cssStylesheet.textContent = cssFileBase + cssFileBar;
topButton();
} else {
cssStylesheet.textContent = cssFileBase;
document.querySelector('#links-bar').removeAttribute('style');
let elements = ['#top-navigation-button']; // '#close-bar'
for (let i = 0; i < elements.length; i++) {
if (document.querySelector(elements[i])) {
document.querySelector(elements[i]).remove();
}
}
}
}
function scrollDown() {
let url;
// Create toolbar and a button when scrolling down
document.addEventListener ("scroll", function() {
if (location.href == url ||
window.pageYOffset < 300) {
floatBar();
}
if (location.href != url) {
url = location.href;
}
});
}
/*
window.addEventListener ("hashchange", function() {
document.querySelector('#links-bar').style.display = 'none';
});
*/
/*
window.addEventListener ("scroll", function() {
const elementTitle = document.querySelector('#title');
const elementStyle = document.getElementById(namespace);
if (isInViewport(elementTitle)) {
elementStyle.textContent = stylesheetBase;
} else {
elementStyle.textContent = stylesheetBase + stylesheetBar;
}
});
*/
/*
// FIXME This is a safer fashion to do this task,
// specifically against server policy.
// NOTE Element is created, albeit without type="text/css",
// but no change applied, not even with !important
window.addEventListener ("scroll", function() {
const elementTitle = document.querySelector('#subtitle');
let elementStyle = document.querySelector('#bar');
if (isInViewport(elementTitle) && elementStyle) {
if (elementStyle) {
elementStyle.remove();
}
} else if (!elementStyle) {
elementStyle = document.createElement('style');
document.head.append(elementStyle);
elementStyle.textContent = stylesheetBar;
elementStyle.type = 'text/css';
elementStyle.id = 'bar';
}
});
*/
function imageData() {
/* TODO handle loading of images by saving bandwidth
document.body.addEventListener ("mouseover", function(e) {
if (e.target && e.target.nodeName == "IMG" && !e.target.src) {
console.log('DELEGATED');
source = e.target.getAttribute('src-data');
e.target.removeAttribute('src-data');
e.target.src = source;
}
});
for (const image of document.querySelectorAll('img')) {
image.addEventListener('mouseover', loadImage(image));
//image.onmouseover = () => {
// image.removeEventListener('mouseover',loadImage(image));
//}
}
*/
/*
for (const image of document.querySelectorAll('img')) {
image.addEventListener('focus',event => {
//image.addEventListener('mouseover',event => {
if (image.getAttribute('src-data')) {
//toggleAttribute(image);
source = image.getAttribute('src-data');
image.removeAttribute('src-data');
image.src = source;
}
}, {passive: true});
image.onmouseover = () => {
if (image.getAttribute('src-data')) {
//toggleAttribute(image);
source = image.getAttribute('src-data');
image.removeAttribute('src-data');
image.src = source;
}
};
}
*/
}
// Create status bar
function infoSquare(text) {
if (document.querySelector('#info-square')) {
document.querySelector('#info-square').remove();
}
let divElement = document.createElement('div');
divElement.id = 'info-square';
divElement.innerHTML = text; // codeberg feeds
//divElement.textContent = text;
document.body.append(divElement);
}
function topButton() {
if (document.querySelector('#top-navigation-button')) return;
let divElement = document.createElement('div');
divElement.id = 'top-navigation-button';
divElement.innerHTML = '^'; // ^ is better than ⬆️⥣⇧⇪➦
// behaviour
divElement.onclick = () => {
window.scrollTo({ top: 0 });
};
document.body.append(divElement);
}
// /questions/123999/how-can-i-tell-if-a-dom-element-is-visible-in-the-current-viewport
// https://www.javascripttutorial.net/dom/css/check-if-an-element-is-visible-in-the-viewport/
function isInViewport(element) {
const rect = element.getBoundingClientRect();
return (
rect.top >= 0 &&
rect.left >= 0 &&
rect.bottom <= (window.innerHeight || document.documentElement.clientHeight) &&
rect.right <= (window.innerWidth || document.documentElement.clientWidth)
);
}
function loadImage(image) {
//image.removeEventListener('mouseover',loadImage(image));
console.log('onmouseover');
let source = image.getAttribute('src-data');
image.removeAttribute('src-data');
image.src = source;
}
/* TODO handle loading of images by saving bandwidth
function toggleAttribute(image) {
source = image.getAttribute('src-data');
image.removeAttribute('src-data');
image.src = source;
}
*/
/* TODO handle loading of images by saving bandwidth
for (const image of document.querySelectorAll('img')) {
//source = image.src;
//image.removeAttribute('src');
//image.setAttribute('src-data', source);
image.setAttribute('src-data', image.src);
image.removeAttribute('src');
}
*/
/* TODO remove or parse <aside> or refer to XSLT to parse it as HTML
// https://web.dev/feed.xml
// /questions/9848465/js-remove-a-tag-without-deleting-content
for (const aside of document.querySelectorAll('aside')) {
aside.remove();
}
*/
function queryByXPath(queries) {
let result, i = 0;
do {
result = document.evaluate(
queries[i], document,
null, XPathResult.STRING_TYPE);
i = i + 1;
result = result.stringValue;
} while (!result && i < queries.length);
return result;
}
function pageLoader() {
let
newDocument, insertDocument, removeDocument;
// /questions/6464592/how-to-align-entire-html-body-to-the-center
const
loadPage = `
<html>
<head>
<title>Newspaper</title>
<style>
html, body {
height: 100%; }
html {
display: table;
margin: auto; }
body {
display: table-cell;
vertical-align:middle;
background-color: #f1f1f1;
font-family: "Helvetica Neue", Helvetica,Arial, sans-serif;
cursor:default;
user-select: none;
max-height: 100%;
max-width: 100%; }
div {
font-size: 6vw;
font-weight: bold; }
</style>
</head>
<body>
<div>📰 Newspaper</div>
<div>Web Feed Reader</div>
<div>Loading web feed...</div>
</body>
</html>`,
domParser = new DOMParser();
newDocument = domParser.parseFromString(loadPage, 'text/html');
insertDocument = document.importNode(newDocument.documentElement, true);
removeDocument = document.documentElement;
document.replaceChild(insertDocument, removeDocument);
}