H5js注入

var mouseEvent = document.createEvent("MouseEvents");
                mouseEvent.initMouseEvent("contextmenu", true, true, null);
          
      $('.html5-video-player').dispatchEvent(mouseEvent);
$('.ytp-popup.ytp-contextmenu').querySelector('.ytp-panel-menu').querySelectorAll('.ytp-menuitem')[7].click()




var mouseEvent = document.createEvent("MouseEvents");
         
       mouseEvent.initMouseEvent("contextmenu", true, true, null);
      
     document.getElementsByClassName('html5-video-player')[0].dispatchEvent(mouseEvent);
document.querySelectorAll("div.ytp-popup")[2].querySelector('.ytp-panel-menu').querySelectorAll('.ytp-menuitem')[7].click()



var mouseEvent = document.createEvent("MouseEvents");
        

       mouseEvent.initMouseEvent("contextmenu", true, true, null);
      
    
 document.getElementsByClassName('html5-video-player')[0].dispatchEvent(mouseEvent);

document.querySelectorAll('.ytp-menuitem')[7].click()



document.getElementsByClassName('html5-video-info-panel-content')[0].childNodes[11].lastChild.lastChild.innerHTML


$('button[aria-label="ÉèÖÃ"]').click()



var vid=document.getElementsByTagName('video')[0];
vid.addEventListener('timeupdate',function(e){
           console.log(e.target.currentTime,e.target.duration,vid.videoWidth,vid.videoHeight,vid.duration);
              });

vid.addEventListener('durationchange',function(e){
           console.log('loadedmetadata' + vid.videoWidth,vid.videoHeight,vid.duration);
             });

vid.addEventListener('waiting',function(e){
           console.log('waiting'  +  vid.videoWidth,vid.videoHeight,vid.duration);
             });
vid.addEventListener('durationchange',function(e){
           console.log('durationchange'  + vid.videoWidth,vid.videoHeight,vid.duration);
             });

vid.addEventListener('canplay',function(e){
           console.log('canplay'+ vid.videoWidth,vid.videoHeight,vid.duration);
             });

你可能感兴趣的:(H5js注入)