Compare commits
2 commits
897d12ed4e
...
3ad11a4788
Author | SHA1 | Date | |
---|---|---|---|
3ad11a4788 | |||
dfd75221ca |
2 changed files with 11 additions and 3 deletions
|
@ -59,6 +59,7 @@ const parseAtomFeed = (feed: Element, url: string | null) => {
|
|||
description: getNodeContent(feed, 'subtitle'),
|
||||
feedUrl: url?.length ? url : window.location.href,
|
||||
homeUrl: homeURL,
|
||||
iconUrl: iconURL,
|
||||
image: {
|
||||
imageUrl: logoURL || iconURL,
|
||||
targetUrl: homeURL,
|
||||
|
|
|
@ -15,8 +15,8 @@
|
|||
</div>
|
||||
|
||||
<div class="description" v-if="feed.description?.length">
|
||||
<h2 v-if="feed.html.description" v-html="feed.description" />
|
||||
<h2 v-else v-text="feed.description" />
|
||||
<span v-if="feed.html.description" v-html="feed.description" />
|
||||
<span v-else v-text="feed.description" />
|
||||
</div>
|
||||
</header>
|
||||
|
||||
|
@ -64,6 +64,13 @@ export default {
|
|||
|
||||
async mounted() {
|
||||
this.feed = (await browser.storage.local.get('feedData'))?.feedData || {}
|
||||
if (this.feed.iconUrl) {
|
||||
const link = document.querySelector("link[rel*='icon']") || document.createElement('link')
|
||||
link.type = 'image/x-icon'
|
||||
link.rel = 'shortcut icon'
|
||||
link.href = this.feed.iconUrl
|
||||
document.getElementsByTagName('head')[0].appendChild(link)
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
@ -183,7 +190,7 @@ main {
|
|||
font-size: 1.25em;
|
||||
|
||||
.description {
|
||||
max-width: 45em;
|
||||
padding: 1em;
|
||||
text-align: justify;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue