@ba0918/simple-custom-url-scheme
v0.0.2
Published
Simple custom URL scheme launcher.
Downloads
6
Readme
simple-custom-url-scheme
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