0.1.3 • Published 6 months ago

@rain-star/protocol-check v0.1.3

Weekly downloads
-
License
ISC
Repository
-
Last release
6 months ago

protocol-check

Detect whether a custom protocol is available in browser (FF, Chrome, IE8, IE9, IE10, IE11, and Edge)

Install

npm install @rain-star/protocol-check

Usage

import protocolCheck from '@rain-star/protocol-check'

protocolCheck({
  url: 'custom protocol url',
  onSuccess: () => {
    // 成功的回调,用于后续操作(e.g. report)
    console.log('Success')
  },
  onError: () => {
    // 打开自定义协议失败(e.g. 浏览器不支持、未安装支持自定义协议的客户端)
    console.error('Error')
  }
})

Thanks

https://github.com/ismailhabib/custom-protocol-detection

0.1.2

6 months ago

0.1.1

6 months ago

0.0.11

6 months ago

0.0.12

6 months ago

0.1.3

6 months ago

0.0.10

1 year ago

0.0.8

1 year ago

0.0.7

1 year ago

0.0.6

1 year ago

0.0.5

1 year ago