@ba0918/simple-custom-url-scheme

0.0.2 • Public • Published

simple-custom-url-scheme

Build Status

Simple custom URL scheme launcher.

Install

yarn add @ba0918/simple-custom-url-scheme

Usage

for Node.js

import { dispatchFromUserAgent } from '@ba0918/simple-custom-url-scheme'

dispatchFromUserAgent(window.navigator.userAgent, {
  'Android': { url: 'https://www.google.co.jp/', fallback: 'https://www.google.co.jp/' },
  'iOS': { url: 'https://www.google.co.jp/', fallback: 'https://www.google.co.jp/' },
  'PC': { url: 'https://www.google.co.jp/', fallback: 'https://www.google.co.jp/' },
})

for Browser

<script src="./simple-custom-url-scheme.js"></script>
<script>
  window.SimpleCustomURLScheme.dispatchFromUserAgent(window.navigator.userAgent, {
    'Android': { url: 'https://www.google.co.jp/', fallback:   'https://www.google.co.jp/' },
    'iOS': { url: 'https://www.google.co.jp/', fallback: 'https://www.google.co.jp/' },
    'PC': { url: 'https://www.google.co.jp/', fallback: 'https://www.google.co.jp/' },
  });
</script>

Development

Setup

yarn install

Build

yarn run build

Test

yarn run test

Publish

yarn run build
cd dist
npm publish --access=public

Readme

Keywords

none

Package Sidebar

Install

npm i @ba0918/simple-custom-url-scheme

Weekly Downloads

0

Version

0.0.2

License

MIT

Last publish

Collaborators

  • ba0918