|
|
|
@ -321,9 +321,13 @@ function getImgCDNProxy($path){ |
|
|
|
|
function getImgCDN($path){ |
|
|
|
|
if(stripos($path, 'moe') !== false){ |
|
|
|
|
preg_match_all('/img_(\S*?)_(\d{2,4})x(\d{2,4})_(\S*?)_(\S*?)_(\S*?).(jpe?g|png|gif|svg)\b/', $path, $arr); |
|
|
|
|
return str_replace('moe','https://fastly.jsdelivr.net/npm/ushio-api-img-moe@5.0.'.intval($arr[1][0]/10).'',$path); |
|
|
|
|
//https://testingcf.jsdelivr.net/ |
|
|
|
|
//https://gcore.jsdelivr.net/ |
|
|
|
|
//$d = 'https://testingcf.jsdelivr.net/'; |
|
|
|
|
$d = 'https://gcore.jsdelivr.net/'; |
|
|
|
|
// $d = 'https://fastly.jsdelivr.net/'; |
|
|
|
|
// $d = 'https://cdn.jsdelivr.net/'; |
|
|
|
|
// $d = 'https://originfastly.jsdelivr.net/'; |
|
|
|
|
// $d = 'https://quantil.jsdelivr.net/'; |
|
|
|
|
return str_replace('moe',$d.'npm/ushio-api-img-moe@5.0.'.intval($arr[1][0]/10).'',$path); |
|
|
|
|
} |
|
|
|
|
return getImg($path); |
|
|
|
|
} |
|
|
|
|