chore: upgrade version

This commit is contained in:
ccbikai
2025-11-15 19:46:00 +08:00
parent dde6425a57
commit 6a0bf4abdd
15 changed files with 7455 additions and 4298 deletions

View File

@@ -1,9 +1,9 @@
import { $fetch } from 'ofetch'
import * as cheerio from 'cheerio'
import { LRUCache } from 'lru-cache'
import flourite from 'flourite'
import prism from '../prism'
import { LRUCache } from 'lru-cache'
import { $fetch } from 'ofetch'
import { getEnv } from '../env'
import prism from '../prism'
const cache = new LRUCache({
ttl: 1000 * 60 * 5, // 5 minutes
@@ -55,13 +55,15 @@ function getVideo($, item, { staticProxy, index }) {
video?.attr('src', staticProxy + video?.attr('src'))
?.attr('controls', true)
?.attr('preload', index > 15 ? 'auto' : 'metadata')
?.attr('playsinline', true).attr('webkit-playsinline', true)
?.attr('playsinline', true)
.attr('webkit-playsinline', true)
const roundVideo = $(item).find('.tgme_widget_message_roundvideo_wrap video')
roundVideo?.attr('src', staticProxy + roundVideo?.attr('src'))
?.attr('controls', true)
?.attr('preload', index > 15 ? 'auto' : 'metadata')
?.attr('playsinline', true).attr('webkit-playsinline', true)
?.attr('playsinline', true)
.attr('webkit-playsinline', true)
return $.html(video) + $.html(roundVideo)
}
@@ -106,9 +108,7 @@ function modifyHTMLContent($, content, { index } = {}) {
})
$(content).find('tg-spoiler')?.each((_index, spoiler) => {
const id = `spoiler-${index}-${_index}`
$(spoiler)?.attr('id', id)
?.wrap('<label class="spoiler-button"></label>')
?.before(`<input type="checkbox" />`)
$(spoiler)?.attr('id', id)?.wrap('<label class="spoiler-button"></label>')?.before(`<input type="checkbox" />`)
})
$(content).find('pre').each((_index, pre) => {
try {