📜  youtube 跳过 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:01:13.541000             🧑  作者: Mango

代码示例1
const clear = (() => { const defined = v => v !== null && v !== undefined; const timeout = setInterval(() => { const ad = [...document.querySelectorAll('.ad-showing')][0]; if (defined(ad)) { const video = document.querySelector('video'); if (defined(video)) { video.currentTime = video.duration; } } }, 500); return function() { clearTimeout(timeout); } })();