diff --git a/public/rss.html b/public/rss.html index 8ae79e6..58e4926 100644 --- a/public/rss.html +++ b/public/rss.html @@ -1,6 +1,7 @@ + diff --git a/src/RSS.ts b/src/RSS.ts index eae5622..8b9dd20 100644 --- a/src/RSS.ts +++ b/src/RSS.ts @@ -41,7 +41,6 @@ export class RSS extends LitElement { const result = await response.text(); const rss = (new DOMParser()).parseFromString(result.trim(), 'text/xml'); const channel = rss.getElementsByTagName('channel')[0] ?? null; - console.log(rss); for (let channelI = 0; channelI < channel?.children?.length; channelI++) { const channelChild = channel?.children?.item(channelI); @@ -98,12 +97,17 @@ export class RSS extends LitElement { override render() { return html`
-
RSS Feed for ${this.rssTitle}${this.rssLink ? html`link` : ''}
- ${this.rssItems.map(rssItem => html` -
-
${rssItem.link ? html`${rssItem.title}` : rssItem.title}
-
- `)} + ${this.rssItems?.length > 0 + ? html` +
RSS Feed for ${this.rssTitle}${this.rssLink ? html` ` : ''}
+ ${this.rssItems.map(rssItem => html` +
+
${rssItem.link ? html`${rssItem.title}` : rssItem.title}
+
+ `)} + ` + : html`
There was no valid RSS feed found.
` + }
`;