disable-chrome-ptr

1.1.0 • Public • Published

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()

/disable-chrome-ptr/

    Package Sidebar

    Install

    npm i disable-chrome-ptr

    Weekly Downloads

    1

    Version

    1.1.0

    License

    CC0-1.0

    Last publish

    Collaborators

    • m59