>var href = ${link.href.replace("media.","sys.")}/${hash}.jpg?n=${n}
;
If I read above line correctly, the code also appears to only use the hash from the image names, and make ALL extensions ".jpg"
Trying:
https://media.8kun.top/file_store/7f645ef42b03e8a520c9332d59b352e0a21ddb9eab747d5a08d6d990d1778c12.png
==https://sys.8kun.top/file_store/7f645ef42b03e8a520c9332d59b352e0a21ddb9eab747d5a08d6d990d1778c12.jpg
Link says 404 in my browser