Newspaper (Syndication Feed Reader)

This software renders syndication feeds as XHTML; It supports Atom Activity Streams (Friendica, Nostr, OStatus), Atom Over XMPP (Blasta, Libervia, Movim, Rivista), BitTorrent RSS, JSON Feed, OPML, RDF (DOAP, FOAF, RSS, XMPP), RSS-in-JSON, Simple Machines Forum (SMF), Sitemap, The Atom Syndication Format, and Twtxt; and it also supports navigation (RFC 5005).

Old: v26.01.07 - 2025-12-01 - Improve code concerning to notification; and Add a function to create SVG graphics of icons.
New: v26.01.08 - 2025-12-03 - Display a notification upon generation of preference menus.

  • --- /tmp/diffy20260212-2004593-1xeo4m 2026-02-12 22:47:18.703356219 +0000
  • +++ /tmp/diffy20260212-2004593-6co019 2026-02-12 22:47:18.706356271 +0000
  • @@ -19,13 +19,17 @@
  • // @noframes
  • // @exclude *?streamburner=0*
  • // @exclude *&streamburner=0*
  • -// @version 26.01.07
  • +// @version 26.01.08
  • +// @resource atom.svg https://upload.wikimedia.org/wikipedia/commons/0/07/Application_atom%2Bxml.svg#md5=16cf76b471caddb6021d522044a5018e
  • +// @resource feed.svg https://upload.wikimedia.org/wikipedia/en/4/43/Feed-icon.svg#md5=adac2c035e465a4057b7a77c5ccf40b8
  • +// @resource xmpp.svg https://upload.wikimedia.org/wikipedia/commons/9/95/XMPP_logo.svg#md5=9626b7f89b0cdca86e86a7f32e41ef24
  • // @run-at document-end
  • // @grant GM_addStyle
  • -// @grant GM.setValue
  • +// @grant GM.getResourceURL
  • // @grant GM.getValue
  • // @grant GM.notification
  • // @grant GM.registerMenuCommand
  • +// @grant GM.setValue
  • // ==/UserScript==
  • //"use strict";
  • @@ -5345,7 +5349,7 @@
  • await GM.notification({
  • text: "RSS renderer is currently disabled to this site. Click to enable.",
  • title: "📰 Greasemonkey Newspaper",
  • - image: characterAsSvg("🗞️"),
  • + image: characterAsSvgDataUri("🗞️"),
  • onclick: function() {
  • sessionStorage.removeItem("loadRawDocument");
  • // Consider to pass dictionary "feed" to function postProcess, so that it
  • @@ -8343,8 +8347,17 @@
  • motdAnnouncements(newDocument);
  • }
  • + /*
  • + let icon;
  • + if (feed.logo || feed.icon) {
  • + icon = feed.logo || feed.icon;
  • + } else {
  • + icon = GM.getResourceURL("atom.svg");
  • + }
  • + */
  • +
  • if (enableIcon) {
  • - if (feed.icon || feed.logo) {
  • + if (feed.logo || feed.icon) {
  • let div = newDocument.createElement("div");
  • div.id = "logo";
  • newDocument.body.append(div);
  • @@ -9513,12 +9526,14 @@
  • async function postProcess(feed) {
  • - let motdButton = document.querySelector("#urgent-message button");
  • - if (motdButton) {
  • - motdButton.addEventListener ("click", async function() {
  • - await GM.setValue("motd", false);
  • - document.querySelector("#urgent-message").remove();
  • - });
  • + if (gmSetValue) {
  • + let motdButton = document.querySelector("#urgent-message button");
  • + if (motdButton) {
  • + motdButton.addEventListener ("click", async function() {
  • + await GM.setValue("motd", false);
  • + document.querySelector("#urgent-message").remove();
  • + });
  • + }
  • +
  • }
  • // NOTE feeds.rssboard.org/rssboard
  • @@ -10656,6 +10671,14 @@
  • elementBase.href = "";
  • newDocument.head.appendChild(elementBase);
  • }
  • + /*
  • + let icon;
  • + if (feed.icon) {
  • + icon = feed.icon;
  • + } else {
  • + icon = GM.getResourceURL("atom.svg");
  • + }
  • + */
  • if (feed.icon) {
  • let elementLink = newDocument.createElement("link");
  • elementLink.href = feed.icon;
  • @@ -11141,6 +11164,7 @@
  • // "Font type",
  • // () => setSettingValue("Font type", "Set font type (e.g. arial, sans, serif).", "font-type"),
  • // "T");
  • + notification("Preferences items are now loaded into the menu", "🎛");
  • }
  • async function togglePreference(title, key) {
  • @@ -11382,7 +11406,7 @@
  • .singleNodeValue;
  • };
  • -function characterAsSvg(character) {
  • +function characterAsSvgDataUri(character) {
  • // An SVG string with a character.
  • const svgString = `
  • <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100">
  • @@ -11397,6 +11421,6 @@
  • function notification(message, graphics) {
  • if (gmNotification) {
  • - GM.notification(message, "📰 Greasemonkey Newspaper", characterAsSvg(graphics));
  • + GM.notification(message, "📰 Greasemonkey Newspaper", characterAsSvgDataUri(graphics));
  • }
  • }