Skip to content

Commit

Permalink
Fix classList.replace
Browse files Browse the repository at this point in the history
* See: b5e9146
  • Loading branch information
stevenjoezhang committed Jun 7, 2024
1 parent 1c85ac7 commit 41ccd7b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions app/js/panel.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ class Panel {
const succeed = await downloader.getPlayUrlWebPage(videoUrl);
if (succeed) {
const data = downloader.videoData;
document.getElementById("videoUrl").classList.replace("is-invalid", "is-valid");
document.getElementById("videoUrl").classList.remove("is-invalid");
document.getElementById("videoUrl").classList.add("is-valid");
getDanmaku(); //获取cid后,获取下载链接和弹幕信息
// console.log("VIDEO INFO", data);
document.getElementById("nav").classList.remove("d-none");
Expand All @@ -33,7 +34,8 @@ class Panel {
this.getData();
} else {
showError("无效的视频链接!");
document.getElementById("videoUrl").classList.replace("is-valid", "is-invalid");
document.getElementById("videoUrl").classList.remove("is-valid");
document.getElementById("videoUrl").classList.add("is-invalid");
}
}

Expand Down

0 comments on commit 41ccd7b

Please sign in to comment.