anime-downloader bug fix 18.
function fix
This commit is contained in:
@@ -20,34 +20,8 @@
|
||||
get: (searchParams, prop) => searchParams.get(prop),
|
||||
})
|
||||
|
||||
$(document).ready(function(){
|
||||
console.log(params.code)
|
||||
if (params.code === '') {
|
||||
|
||||
} else {
|
||||
document.getElementById("code").value = params.code
|
||||
{#document.getElementById("analysis_btn").click();#}
|
||||
}
|
||||
|
||||
if ( "{{arg['ohli24_current_code']}}" !== "") {
|
||||
if (params.code === null || params.code === '') {
|
||||
document.getElementById("code").value = "{{arg['ohli24_current_code']}}";
|
||||
} else {
|
||||
|
||||
console.log('params code exist')
|
||||
console.log(params.code)
|
||||
document.getElementById("code").value = params.code
|
||||
// document.getElementById("analysis_btn").click();
|
||||
}
|
||||
// 값이 공백이 아니면 분석 버튼 계속 누름
|
||||
// {#document.getElementById("analysis_btn").click();#}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// 분석 버튼 클릭시 호출
|
||||
$("body").on('click', '#analysis_btn', function(e){
|
||||
e.preventDefault();
|
||||
function analyze() {
|
||||
// e.preventDefault();
|
||||
const code = document.getElementById("code").value
|
||||
console.log(code)
|
||||
$.ajax({
|
||||
@@ -58,7 +32,7 @@
|
||||
dataType: "json",
|
||||
success: function (ret) {
|
||||
if (ret.ret === 'success' && ret.data != null) {
|
||||
{#console.log(ret.code)#}
|
||||
// {#console.log(ret.code)#}
|
||||
console.log(ret.data)
|
||||
make_program(ret.data)
|
||||
} else {
|
||||
@@ -66,7 +40,7 @@
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function make_program(data) {
|
||||
current_data = data;
|
||||
@@ -129,6 +103,79 @@
|
||||
$('input[id^="checkbox_"]').bootstrapToggle()
|
||||
}
|
||||
|
||||
$(function () {
|
||||
console.log(params.code)
|
||||
if (params.code === '') {
|
||||
|
||||
} else {
|
||||
document.getElementById("code").value = params.code
|
||||
// {#document.getElementById("analysis_btn").click();#}
|
||||
}
|
||||
|
||||
if ( "{{arg['ohli24_current_code']}}" !== "") {
|
||||
if (params.code === null) {
|
||||
console.log('params.code === null')
|
||||
document.getElementById("code").value = "{{arg['ohli24_current_code']}}";
|
||||
|
||||
} else if(params.code === '') {
|
||||
document.getElementById("code").value = "{{arg['ohli24_current_code']}}";
|
||||
} else {
|
||||
|
||||
console.log('params code exist')
|
||||
console.log(params.code)
|
||||
document.getElementById("code").value = params.code
|
||||
analyze()
|
||||
// document.getElementById("analysis_btn").click();
|
||||
// $('#analysis_btn').trigger('click')
|
||||
}
|
||||
// 값이 공백이 아니면 분석 버튼 계속 누름
|
||||
// {#document.getElementById("analysis_btn").click();#}
|
||||
} else {
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
})
|
||||
|
||||
$(document).ready(function(){
|
||||
|
||||
|
||||
// $('#analysis_btn').unbind("click").bind('click', function (e) {
|
||||
// e.preventDefault();
|
||||
// e.stopPropagation()
|
||||
// console.log('test')
|
||||
// const code = document.getElementById("code").value
|
||||
// console.log(code)
|
||||
// })
|
||||
|
||||
// $("body").unbind('click', '#analysis_btn')
|
||||
// 분석 버튼 클릭시 호출
|
||||
// $("body").on('click', '#analysis_btn', function(e){
|
||||
$("#analysis_btn").unbind("click").bind('click', function(e){
|
||||
e.preventDefault();
|
||||
e.stopPropagation()
|
||||
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('<strong>분석 실패</strong><br>' + ret.log, {type: 'warning'});
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
$("body").on('click', '#go_ohli24_btn', function(e){
|
||||
e.preventDefault();
|
||||
window.open("{{arg['ohli24_url']}}", "_blank");
|
||||
|
||||
Reference in New Issue
Block a user