Skip to content

Commit

Permalink
fix(index.js): 视频未播放就显示结束
Browse files Browse the repository at this point in the history
  • Loading branch information
SessionHu committed Jul 17, 2024
1 parent fd77693 commit e14de62
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// ==UserScript==
// @name Etw360ff
// @namespace org.sessx6cf.etw360ff
// @version 0.1.1
// @version 0.1.2
// @description Etw360ff
// @author SessionHu
// @license mit
Expand Down Expand Up @@ -29,6 +29,7 @@
const skipBtn = document.querySelector("div.btn.action-skip");
if (skipBtn !== null) {
skipBtn.click();
console.log("[Etw360ff] 有题目! 喵喵才不做呢~");
}
// 继续播放
const continuePlayBtn = document.querySelector(`img[alt="继续播放"]`);
Expand All @@ -39,7 +40,8 @@
// 提示播放结束
const videoDuration = document.querySelector("span.vjs-duration-display");
const videoCurrent = document.querySelector("span.vjs-current-time-display");
if (videoCurrent !== null && videoDuration.innerText !== "0:00" && (videoDuration.innerText === videoCurrent.innerText)) {
if (videoCurrent !== null && videoCurrent.innerText !== "" && videoDuration.innerText !== "0:00" && (videoDuration.innerText === videoCurrent.innerText))
{
window.clearInterval(sessEtw360ffIntervalId);
console.log("[Etw360ff] 结束了喵!");
document.title = "播放结束";
Expand Down

0 comments on commit e14de62

Please sign in to comment.