GithubHelp home page GithubHelp logo

aliuxcore / pagedetection Goto Github PK

View Code? Open in Web Editor NEW
0.0 4.0 0.0 132 KB

page detection, will detect how long user put page there, and do not do anything action etc

License: MIT License

JavaScript 100.00%

pagedetection's Introduction

#Pagedetection

page detection, will detect how long user put page there, and do not do anything action etc

Usage

PageDetection.init(config).start();

config配置

  1. 'timing': 检测时间长度,单位毫秒,默认为10000。

  2. 'once': 当第一次timeout触发后,是否继续做监测,默认true。

  3. 'onTimeout': function,时间点到了以后触发回调函数。

  4. 'onPause':暂停时触发回调函数。

method

init PageDetection.init()

初始化方法,支持链状调用。

start PageDetection.start()

开始计时。

pause PageDetection.pause()

计时暂停,不清空当前的时间。

resume PageDetection.resume()

从暂停继续,继续计时。

reset PageDetection.reset()

重置当前的计时,当页面有交互时,会默认调用该方法。

cancel PageDetection.cancel()

取消当前的计时。

getTime PageDetection.getTime()

获取开始到当前已经过的时间。

pagedetection's People

Contributors

macisi avatar aliuxcore avatar

Watchers

James Cloos avatar zeroven avatar  avatar blank 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.