From b2d07abecb7d67846ea40d7f5a5092a23861fe1f Mon Sep 17 00:00:00 2001 From: projectdx Date: Thu, 7 Apr 2022 21:30:59 +0900 Subject: [PATCH] anime-downloader bug fix 16. lazy image loader --- .../anime_downloader_ohli24_category.html | 7 ++-- .../anime_downloader_ohli24_request.html | 40 ++++++++++--------- 2 files changed, 25 insertions(+), 22 deletions(-) diff --git a/templates/anime_downloader_ohli24_category.html b/templates/anime_downloader_ohli24_category.html index fe727a6..d624c58 100644 --- a/templates/anime_downloader_ohli24_category.html +++ b/templates/anime_downloader_ohli24_category.html @@ -80,9 +80,10 @@ if (current_screen_movie_data !== '') { if (type === "ing") { make_airing_list(ret.data, page) - setTimeout(() => { - observer.observe(); - }, 2000); + // setTimeout(() => { + // observer.observe(); + // }, 1000); + observer.observe(); } else { make_screen_movie_list(ret, page) } diff --git a/templates/anime_downloader_ohli24_request.html b/templates/anime_downloader_ohli24_request.html index c1b8bdb..2844ed2 100644 --- a/templates/anime_downloader_ohli24_request.html +++ b/templates/anime_downloader_ohli24_request.html @@ -33,11 +33,12 @@ if (params.code === null || params.code === '') { document.getElementById("code").value = "{{arg['ohli24_current_code']}}"; } else { + console.log('params code exist') 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(); const code = document.getElementById("code").value console.log(code) - $.ajax({ - url: '/' + package_name + '/ajax/' + sub + '/analysis', - type: "POST", - cache: false, - data: {code:code}, - dataType: "json", - success: function (ret) { - if (ret.ret === 'success' && ret.data != null) { - {#console.log(ret.code)#} - console.log(ret.data) - make_program(ret.data) - } else { - $.notify('분석 실패
' + ret.log, {type: 'warning'}); - } - } + $.ajax({ + url: '/' + package_name + '/ajax/' + sub + '/analysis', + type: "POST", + cache: false, + data: {code:code}, + dataType: "json", + success: function (ret) { + if (ret.ret === 'success' && ret.data != null) { + {#console.log(ret.code)#} + console.log(ret.data) + make_program(ret.data) + } else { + $.notify('분석 실패
' + ret.log, {type: 'warning'}); + } + } + }); }); function make_program(data) { @@ -162,8 +164,8 @@ } } }); -}); -}); + + }); });