Giter Site home page Giter Site logo

videomaster's Introduction

VideoMaster

一个快速生成 修改当前页面视频速度代码 的万能代码

一件扫描当前页面下所有video标签,自动生成修改video标签的javascript代码 如图

playbackRate是倍速 currentTime是视频当前的时间(秒) 在浏览器控制台输入下列代码即可

evoAList = []
function getVideo(document,documentStr){
	    
    if (document.getElementsByTagName('video').length === 0) return false
    var len = document.getElementsByTagName('video').length
    for(var i=0;i<len;i++){
                console.log(`${documentStr}.getElementsByTagName('video')[${i}].pause=function(){return false}`)
                console.log(`${documentStr}.getElementsByTagName('video')[${i}].playbackRate=15`)
                console.log(`${documentStr}.getElementsByTagName('video')[${i}].currentTime =600`)
            }
}

function getAllIframe(document,documentStr){
    
    if (document.getElementsByTagName('iframe').length === 0) return false
    var len = document.getElementsByTagName('iframe').length
    for(var i=0;i<len;i++){

        

        if(document.getElementsByTagName('iframe')[i].contentDocument === null) return false
        getAllIframe(document.getElementsByTagName('iframe')[i].contentDocument,`${documentStr}.getElementsByTagName('iframe')[${i}].contentDocument`)

        evoAList.push({document:document.getElementsByTagName('iframe')[i].contentDocument,documentStr:`${documentStr}.getElementsByTagName('iframe')[${i}].contentDocument`})
                

        }
    return evoAList
}

(async function(){
    getVideo(document,"document")
    evoAList = getAllIframe(document,"document")
    var docuStr
    var docu
    for(var i=0;i<evoAList.length;i++){
                docuStr = evoAList[i].documentStr
                docu = evoAList[i].document
                getVideo(docu,docuStr)
                
            }
    
})()

image.png

三条代码分别是永不暂停,修改倍速,修改进度条(上帝之手)

videomaster's People

Contributors

ev0a avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.