diff --git a/src/assets/style.css b/src/assets/style.css index 99b467b..75f0502 100644 --- a/src/assets/style.css +++ b/src/assets/style.css @@ -638,6 +638,11 @@ 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/lib/telegram/index.js b/src/lib/telegram/index.js index 5a26e0f..fc20391 100644 --- a/src/lib/telegram/index.js +++ b/src/lib/telegram/index.js @@ -11,6 +11,27 @@ 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') + return ` +
+ +
+ ` + })?.get()?.join('') +} + +function getImageStickers($, item, { staticProxy, index }) { + return $(item).find('.tgme_widget_message_sticker')?.map((_index, image) => { + const url = $(image).attr('data-webp') + return `Sticker` + })?.get()?.join('') +} + function getImages($, item, { staticProxy, id, index, title }) { return $(item).find('.tgme_widget_message_photo_wrap')?.map((_index, photo) => { const url = $(photo).attr('style').match(/url\(["'](.*?)["']/)?.[1] @@ -82,6 +103,8 @@ function getPost($, item, { channel, staticProxy, index = 0 }) { text: content?.text(), content: [ $.html($(item).find('.tgme_widget_message_reply')?.wrapInner('')?.wrapInner('
')), + getImageStickers($, item, { staticProxy, index }), + getVideoStickers($, item, { staticProxy, index }), getImages($, item, { staticProxy, id, index, title }), getVideo($, item, { staticProxy, id, index, title }), content?.html(),