anime-downloader bug fix 16.

lazy image loader
This commit is contained in:
2022-04-07 21:30:59 +09:00
parent 4d0e55b25f
commit b2d07abecb
2 changed files with 25 additions and 22 deletions

View File

@@ -80,9 +80,10 @@
if (current_screen_movie_data !== '') { if (current_screen_movie_data !== '') {
if (type === "ing") { if (type === "ing") {
make_airing_list(ret.data, page) make_airing_list(ret.data, page)
setTimeout(() => { // setTimeout(() => {
observer.observe(); // observer.observe();
}, 2000); // }, 1000);
observer.observe();
} else { } else {
make_screen_movie_list(ret, page) make_screen_movie_list(ret, page)
} }

View File

@@ -33,11 +33,12 @@
if (params.code === null || params.code === '') { if (params.code === null || params.code === '') {
document.getElementById("code").value = "{{arg['ohli24_current_code']}}"; document.getElementById("code").value = "{{arg['ohli24_current_code']}}";
} else { } else {
console.log('params code exist')
document.getElementById("code").value = params.code document.getElementById("code").value = params.code
{#document.getElementById("analysis_btn").click();#} document.getElementById("analysis_btn").click();
} }
// 값이 공백이 아니면 분석 버튼 계속 누름 // 값이 공백이 아니면 분석 버튼 계속 누름
{#document.getElementById("analysis_btn").click();#} // {#document.getElementById("analysis_btn").click();#}
} }
@@ -47,21 +48,22 @@
e.preventDefault(); e.preventDefault();
const code = document.getElementById("code").value const code = document.getElementById("code").value
console.log(code) console.log(code)
$.ajax({ $.ajax({
url: '/' + package_name + '/ajax/' + sub + '/analysis', url: '/' + package_name + '/ajax/' + sub + '/analysis',
type: "POST", type: "POST",
cache: false, cache: false,
data: {code:code}, data: {code:code},
dataType: "json", dataType: "json",
success: function (ret) { success: function (ret) {
if (ret.ret === 'success' && ret.data != null) { if (ret.ret === 'success' && ret.data != null) {
{#console.log(ret.code)#} {#console.log(ret.code)#}
console.log(ret.data) console.log(ret.data)
make_program(ret.data) make_program(ret.data)
} else { } else {
$.notify('<strong>분석 실패</strong><br>' + ret.log, {type: 'warning'}); $.notify('<strong>분석 실패</strong><br>' + ret.log, {type: 'warning'});
} }
} }
});
}); });
function make_program(data) { function make_program(data) {
@@ -162,8 +164,8 @@
} }
} }
}); });
});
}); });
}); });
</script> </script>