Skip to content

Commit

Permalink
docs: example
Browse files Browse the repository at this point in the history
  • Loading branch information
minkyu-yi committed Apr 5, 2016
1 parent 45ff629 commit 9d7b471
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 38 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@ First, check whether app is installed or not.<br>
## History
| Version | Description | Date | Developer |
| ---- | ---- | ---- | ---- |
| 1.0.2 | Fix ios timeout 2000ms | 2016.04 | NHN Ent. FE dev team <dl_javascript@nhnent.com> |
| [1.0.2](https://nhnent.github.io/tui.component.m-app-loader/1.0.2/) | [Fix ios timeout 2000ms](https://github.com/nhnent/tui.component.m-app-loader/releases/tag/1.0.2) | 2016.04 | NHN Ent. FE dev team <dl_javascript@nhnent.com> |
| 1.0.1b | Supporting intentURI using iframe (Android) | 2016.01 | NHN Ent. FE dev team <dl_javascript@nhnent.com> |
| 1.0.1a | Hotfix for supporting intentURI, universalLinks | 2015.10 | NHN Ent. FE dev team <dl_javascript@nhnent.com> |
| <a href="https://nhnent.github.io/tui.component.m-app-loader/1.0.1/">1.0.1</a> | Add static methods for detecting user agent | 2015.10 | NHN Ent. FE dev team <dl_javascript@nhnent.com> |
| [1.0.1](https://nhnent.github.io/tui.component.m-app-loader/1.0.1/) | Add static methods for detecting user agent | 2015.10 | NHN Ent. FE dev team <dl_javascript@nhnent.com> |
| 1.0.0b | ios new window bug fix | 2015.08 | NHN Ent. FE dev team <dl_javascript@nhnent.com> |
| 1.0.0a | defineNamespace apply | 2015.05 | NHN Ent. FE dev team <dl_javascript@nhnent.com> |
| <a href="https://nhnent.github.io/tui.component.m-app-loader/1.0.0/">1.0.0</a> | release | 2015.04 | NHN Ent. FE dev team <dl_javascript@nhnent.com> |
| [1.0.0](https://nhnent.github.io/tui.component.m-app-loader/1.0.0/) | release | 2015.04 | NHN Ent. FE dev team <dl_javascript@nhnent.com> |

## LICENSE
[MIT LICENSE](LICENSE)
31 changes: 19 additions & 12 deletions app-loader.js

Large diffs are not rendered by default.

31 changes: 19 additions & 12 deletions samples/js/app-loader.js

Large diffs are not rendered by default.

29 changes: 18 additions & 11 deletions src/js/appLoader.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,10 @@ var AppLoader = tui.util.defineClass(/** @lends AppLoader.prototype */{
* Get first user agent (it will be browser name)
* @api
* @memberof AppLoader
* @function getUserAgent
* @return {string}
* @return {string} user agent
* @example
* var AppLoader = tui.component.m.AppLoader;
* var ua = AppLoader.getUserAgent(); // ex) 'safari'
*/
getUserAgent: function() {
return ad.userAgent();
Expand All @@ -33,8 +35,10 @@ var AppLoader = tui.util.defineClass(/** @lends AppLoader.prototype */{
* Get all user agents by array
* @api
* @memberof AppLoader
* @function getUserAgents
* @return {Array} agent strings
* @example
* var AppLoader = tui.component.m.AppLoader;
* var uas = AppLoader.getUserAgents(); // ex) ['safari']
*/
getUserAgents: function() {
return ad.userAgents();
Expand All @@ -44,8 +48,10 @@ var AppLoader = tui.util.defineClass(/** @lends AppLoader.prototype */{
* Get OS
* @api
* @memberof AppLoader
* @function getOS
* @return {string}
* @return {string} os
* @example
* var AppLoader = tui.component.m.AppLoader;
* var os = AppLoader.getOS(); // 'iOS' or 'AndroidOS'
*/
getOS: function() {
return ad.getOS();
Expand All @@ -55,7 +61,7 @@ var AppLoader = tui.util.defineClass(/** @lends AppLoader.prototype */{
* Get version
* @api
* @memberof AppLoader
* @function getVersion
* @param {string} type - os type
* @return {number|string} version
* @example
* getVersion('IOS');
Expand Down Expand Up @@ -212,6 +218,7 @@ var AppLoader = tui.util.defineClass(/** @lends AppLoader.prototype */{

/**
* Call app
* @api
* @param {object} options The option for app
* @param {object} options.ios IOS app information
* @param {object} options.android Android information
Expand All @@ -232,14 +239,14 @@ var AppLoader = tui.util.defineClass(/** @lends AppLoader.prototype */{
* android: {
* intentURI: 'intent://home#Intent;scheme=fecheck;package=com.fecheck;end' // android intent uri
* },
* timerSet: {
* ios: 2000,
* android: 1000
* timerSet: { // optional values
* ios: 2000, // default: 2000
* android: 1000 // default: 800
* },
* notFoundCallback: function() {
* notFoundCallback: function() { // if not installed
* alert('not found');
* },
* etcCallback: function() {
* etcCallback: function() { // if not mobile
* alert('etc');
* }
* });
Expand Down

0 comments on commit 9d7b471

Please sign in to comment.