>>14517754 (/pb)
You can add auto play gif by removing this:
let needsReplaced = l.href.match(/media.8kun.top\/.*[a-f0-9]{64}.(png|jpg|jpeg)/);
if (!needsReplaced) { return; }
let href = l.href.replace(TextUtil.MEDIA_SERVER, TextUtil.SYS_SERVER);
let pngMatch = href.match(/.*([a-f0-9]{64}).png$/);
if (pngMatch) {
let hash = pngMatch[1];
href = href.replace(${hash}.png
, ${hash}.png/${hash}.jpg
);
}
And replacing it with this:
let needsReplaced = l.href.match(/media.8kun.top\/.*[a-f0-9]{64}.(png|jpg|jpeg|gif)/);
if (!needsReplaced) { return; }
let href = l.href.replace(TextUtil.MEDIA_SERVER, TextUtil.SYS_SERVER);
let pngGif = href.match(/.*([a-f0-9]{64}).(png|gif)$/);
if (pngGif) {
let hash = pngGif[1];
let repStr = ${hash}.${pngGif[2]}
;
href = href.replace(repStr, ${hash}.${pngGif[2]}/${hash}.jpg
);
}