选择视频时出错

时间:2017-09-23 18:35:49

标签: javascript jquery html5 userscripts tampermonkey

我在用户脚本中使用jQuery来选择此页面中的视频: https://drive.google.com/file/d/0B70bgg53J5zQMG15VWYwQ05MMFU/view

这是我正在运行的脚本:

(function() {
   var exist = setInterval(function() {
   console.log('checking');

   if ($("video").length) {
     alert("Video is there !");
     clearInterval(exist);
   }
 }, 100);
})();

我添加了一个间隔来等待元素加载。但我不能选择它。

我还使用了其他选择器:"div.html5-video-container > video""video.video-stream.html5-main-video"

然而没有任何作用。请指导我!

0 个答案:

没有答案