https://github.com/mathieuloutre/applink
Open apps with a URI Scheme from a webpage
https://github.com/mathieuloutre/applink
Last synced: about 1 year ago
JSON representation
Open apps with a URI Scheme from a webpage
- Host: GitHub
- URL: https://github.com/mathieuloutre/applink
- Owner: MathieuLoutre
- License: other
- Created: 2015-02-01T17:46:52.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2015-02-01T17:48:51.000Z (over 11 years ago)
- Last Synced: 2025-04-08T07:06:14.440Z (about 1 year ago)
- Language: JavaScript
- Size: 137 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# AppLink
> Open apps with a URI Scheme from a webpage
AppLink allows you to open apps with a URI Scheme from a webpage instead of for instance opening widgets. Useful for Facebook, Tiwtter, Pinterest sharing.
## Usage
Install using bower: `bower install applink`
Or using npm: `npm install applink`
Or just by downloading the [tarball](https://github.com/MathieuLoutre/applink/archive/master.zip)
```js
var twitter = new AppLink()
twitter.open({
error: function () {
window.open(encodeURI("https://twitter.com/intent/tweet?text=Look at this awesome thing"), "_blank", "toolbar=0,personalbar=0,resizable,scrollbars,status,width=550,height=450,top=" + Math.round((screen.height - 450)/2) + ",left=" + Math.round((screen.width - 550)/2))
},
success: function () {},
nativeURL: encodeURI("twitter://post?message=Look at this awesome thing")
})
```
## TODO
- Testing
## Changelog
- 0.1.0 - First release