PHP Classes

File: rss_fetch.js

Recommend this page to a friend!
  Packages of Mike Jordan   RSS Fetch XML   rss_fetch.js   Download  
File: rss_fetch.js
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: RSS Fetch XML
Fetch and cache an RSS or an Atom feed from a URL
Author: By
Last change: Bump version to 1.3.1

Updated version number to 1.3.1 in the header.
Date: 3 days ago
Size: 678 bytes
 

Contents

Class file image Download
/** * RSS Javascript Function * * @package RssFetchXml * @version 1.3.1 * @author MT Jordan <mtjo62@gmail.com> * @copyright 2026 * @license MIT */ let rssUrl = "https://somesite.com/rss/rssFetchXml_new.php"; window.addEventListener("load", rssFetch(), false); async function rssFetch() { const rssClass = document.getElementsByClassName("rss-feed"); for (i = 0; i < rssClass.length; i++) { const response = await fetch(rssUrl + "?file=" + rssClass[i].getAttribute("data-rss")); const data = await response.json(); rssClass[i].innerHTML = data; } } /* EOF rss_fetch.js */ /* Location: ./rss_fetch.js */