perf: optmize
This commit is contained in:
parent
b17576867f
commit
c0f0990ff0
|
@ -402,7 +402,7 @@ function get_qq_avatar(){
|
|||
$encrypted=$_GET["qq"];
|
||||
if(isset($encrypted)){
|
||||
$iv = str_repeat($sakura_privkey, 2);
|
||||
$encrypted = urldecode(base64_decode($encrypted));
|
||||
$encrypted = base64_decode(urldecode($encrypted));
|
||||
$qq_number = openssl_decrypt($encrypted, 'aes-128-cbc', $sakura_privkey, 0, $iv);
|
||||
preg_match('/^\d{3,}$/', $qq_number, $matches);
|
||||
$imgurl='https://q2.qlogo.cn/headimg_dl?dst_uin='.$matches[0].'&spec=100';
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
* @date 2019.8.3
|
||||
*/
|
||||
mashiro_global.variables = new function () {
|
||||
this.has_hls = false;
|
||||
this.skinSecter = true;
|
||||
}
|
||||
mashiro_global.ini = new function () {
|
||||
|
@ -523,9 +524,7 @@ function killCoverVideo() {
|
|||
}
|
||||
}
|
||||
|
||||
function coverVideoIni() {
|
||||
if ($('video').hasClass('hls')) {
|
||||
$.getScript("https://cdn.jsdelivr.net/gh/mashirozx/Sakura@3.3.3/cdn/js/src/16.hls.js", function(){
|
||||
function loadHls(){
|
||||
var video = addComment.I('coverVideo');
|
||||
var video_src = $('#coverVideo').attr('data-src');
|
||||
if (Hls.isSupported()) {
|
||||
|
@ -541,7 +540,18 @@ function coverVideoIni() {
|
|||
video.play();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function coverVideoIni() {
|
||||
if ($('video').hasClass('hls')) {
|
||||
if (mashiro_global.variables.has_hls){
|
||||
loadHls();
|
||||
}else{
|
||||
$.getScript("https://cdn.jsdelivr.net/gh/mashirozx/Sakura@3.3.3/cdn/js/src/16.hls.js", function(){
|
||||
loadHls();
|
||||
mashiro_global.variables.has_hls = true;
|
||||
});
|
||||
}
|
||||
//console.info('ini:coverVideoIni()');
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue