mirror of
https://github.com/pompurin404/mihomo-party.git
synced 2024-11-16 11:42:19 +08:00
support gif
This commit is contained in:
parent
062c417208
commit
b6559cbaf9
|
@ -221,6 +221,9 @@ const Proxies: React.FC = () => {
|
||||||
size="sm"
|
size="sm"
|
||||||
onLoad={() => {
|
onLoad={() => {
|
||||||
if (!groups[index].icon.startsWith('http')) return
|
if (!groups[index].icon.startsWith('http')) return
|
||||||
|
if (localStorage.getItem(groups[index].icon)) return
|
||||||
|
// canvas 只支持静态图片
|
||||||
|
if (groups[index].icon.endsWith('gif')) return
|
||||||
const img = new Image()
|
const img = new Image()
|
||||||
img.crossOrigin = 'anonymous'
|
img.crossOrigin = 'anonymous'
|
||||||
img.onload = (): void => {
|
img.onload = (): void => {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user