diff --git a/src/assets/style.css b/src/assets/style.css index 75f0502..99b467b 100644 --- a/src/assets/style.css +++ b/src/assets/style.css @@ -638,11 +638,6 @@ audio::-webkit-media-controls-panel { box-shadow: var(--shadows); } -.content .sticker { - box-shadow: none; - border: none; -} - .content a:link, .content a:visited { line-break: anywhere; diff --git a/src/components/item.astro b/src/components/item.astro index 64949c2..5a846ad 100644 --- a/src/components/item.astro +++ b/src/components/item.astro @@ -181,6 +181,11 @@ const timeago = datetime.isBefore(dayjs().subtract(1, 'w')) margin-right: 2px; } + .content :global(.sticker) { + box-shadow: none; + border: none; + } + .tag-box { flex-wrap: wrap; } diff --git a/src/lib/telegram/index.js b/src/lib/telegram/index.js index fc20391..87c0235 100644 --- a/src/lib/telegram/index.js +++ b/src/lib/telegram/index.js @@ -13,8 +13,8 @@ const cache = new LRUCache({ function getVideoStickers($, item, { staticProxy, index }) { return $(item).find('.js-videosticker_video')?.map((_index, video) => { - const url = $(video).attr('src') - const imgurl = $(video).find('img').attr('src') + const url = $(video)?.attr('src') + const imgurl = $(video).find('img')?.attr('src') return `