Skip to content

Commit

Permalink
未输入搜索内容退出搜索
Browse files Browse the repository at this point in the history
  • Loading branch information
Izumiko committed Feb 18, 2024
1 parent b66e988 commit f0b224b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions ede.js
Original file line number Diff line number Diff line change
Expand Up @@ -578,6 +578,9 @@
}
if (!is_auto) {
animeName = prompt('确认动画名:', animeName);
if (animeName == null || animeName == '') {
return null;
}
}

let searchUrl = apiPrefix + 'https://api.dandanplay.net/api/v2/search/episodes?anime=' + animeName + '&withRelated=true';
Expand Down Expand Up @@ -610,6 +613,9 @@
window.localStorage.setItem(_name_key, animaInfo.animes[selecAnime_id].animeTitle);
let episode_lists_str = ep2string(animaInfo.animes[selecAnime_id].episodes);
episode = prompt('选择剧集:\n' + episode_lists_str, parseInt(episode) || 1);
if (episode == null || episode == '') {
return null;
}
episode = parseInt(episode) - 1;
} else {
selecAnime_id = parseInt(selecAnime_id) - 1;
Expand Down

0 comments on commit f0b224b

Please sign in to comment.