1.1.0 • Published 7 years ago

disable-chrome-ptr v1.1.0

Weekly downloads
3
License
CC0-1.0
Repository
github
Last release
7 years ago

disable-chrome-ptr

Disables mobile Chrome's native pull-to-refresh and returns a function to re-enable it.

View the demo.

install

$ npm install disable-chrome-ptr

example

import disableChromePtr from 'disable-chrome-ptr'
import bowser from 'bowser' // for checking what platform this is running on

// disable it for mobile chrome
const enableChromePtr = (bowser.mobile && bowser.chrome) ? disableChromePtr() : () => {}

// to disable it but keep the annoying glow (why?!)
disableChromePtr({ disablePullGlow: false })

// re-enable it
enableChromePtr()