Skip to content

Commit

Permalink
chore: build dist for 2.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
kyuwoo.choi committed Apr 13, 2018
1 parent 0f7bd7c commit 35ffde2
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 4 deletions.
38 changes: 36 additions & 2 deletions dist/tui-app-loader.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*!
* tui-app-loader.js
* @version 2.0.0
* @version 2.1.0
* @author NHNEnt FE Development Lab <dl_javascript@nhnent.com>
* @license MIT
*/
Expand Down Expand Up @@ -89,6 +89,8 @@ return /******/ (function(modules) { // webpackBootstrap
* Mobile App loader
* @constructor
* @class
* @param {object} options - Option object
* @param {boolean} [options.usageStatistics=true] - Let us know the hostname. If you don't want to send the hostname, please set to false.
* @see AppLoader#exec
* @example <caption>node, commonjs</caption>
* var Apploader = require('tui-app-loader');
Expand All @@ -99,7 +101,7 @@ return /******/ (function(modules) { // webpackBootstrap
* appLoader.exec(...);
*/
var AppLoader = snippet.defineClass(/** @lends AppLoader.prototype */{
init: function() {
init: function(options) {
var agent = new UAParser().getResult();
var os = agent.os;

Expand All @@ -108,6 +110,14 @@ return /******/ (function(modules) { // webpackBootstrap
this.osName = os.name;
this.osVersion = os.version;
this.detector = null;

options = snippet.extend({
usageStatistics: true
}, options);

if (options.usageStatistics) {
sendHostname();
}
},

/**
Expand Down Expand Up @@ -262,6 +272,30 @@ return /******/ (function(modules) { // webpackBootstrap
}
});

var hostnameSent = false;

/**
* send hostname
* @ignore
*/
function sendHostname() {
var hostname = location.hostname;

if (hostnameSent) {
return;
}
hostnameSent = true;

snippet.imagePing('https://www.google-analytics.com/collect', {
v: 1,
t: 'event',
tid: 'UA-115377265-9',
cid: hostname,
dp: hostname,
dh: 'app-loader'
});
}

module.exports = AppLoader;


Expand Down
4 changes: 2 additions & 2 deletions dist/tui-app-loader.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 35ffde2

Please sign in to comment.