core 정리
This commit is contained in:
54
templates/anime_downloader_ohli24_request.html
Normal file
54
templates/anime_downloader_ohli24_request.html
Normal file
@@ -0,0 +1,54 @@
|
||||
{% extends "base.html" %}
|
||||
{% block content %}
|
||||
|
||||
<div>
|
||||
<form id='program_list'>
|
||||
{{ macros.setting_input_text_and_buttons('code', '작품 Code', [['analysis_btn', '분석'], ['go_ohli24_btn', 'Go OHLI24']], desc='예) "https://ohli24.net/c/녹을 먹는 비스코" 이나 "녹을 먹는 비스코"') }}
|
||||
</form>
|
||||
<form id="program_auto_form">
|
||||
<div id='episode_list'></div>
|
||||
</form>
|
||||
</div> <!--전체-->
|
||||
|
||||
<script type="text/javascript">
|
||||
const package_name = "{{arg['package_name'] }}";
|
||||
const sub = "{{arg['sub'] }}";
|
||||
const ohli24_url = "{{arg['ohli24_url']}}";
|
||||
const current_data = null;
|
||||
|
||||
$(document).ready(function(){
|
||||
if ( "{{arg['ohli24_current_code']}}" !== "" ) {
|
||||
document.getElementById("code").value = "{{arg['ohli24_current_code']}}";
|
||||
document.getElementById("analysis_btn").click();
|
||||
}
|
||||
|
||||
// 분석 버튼 클릭시 호출
|
||||
$("body").on('click', '#analysis_btn', function(e){
|
||||
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)
|
||||
{#make_program(ret.data)#}
|
||||
} else {
|
||||
$.notify('<strong>분석 실패</strong><br>' + ret.log, {type: 'warning'});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$("body").on('click', '#go_ohli24_btn', function(e){
|
||||
e.preventDefault();
|
||||
window.open("{{arg['ohli24_url']}}", "_blank");
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user