bump: 3.0.0 close #78

This commit is contained in:
qingwei.li 2017-02-19 14:40:16 +08:00
commit 74ce0bf588
10 changed files with 1358 additions and 957 deletions

View file

@ -1,9 +1,8 @@
this.D = this.D || {};
this.D.GA = (function () {
(function () {
'use strict';
// From https://github.com/egoist/vue-ga/blob/master/src/index.js
function appendScript () {
var script = document.createElement('script');
script.async = true;
@ -28,23 +27,15 @@ function collect () {
window.ga('send', 'pageview');
}
var install = function () {
if (install.installed) { return }
install.installed = true;
var install = function (hook) {
if (!window.$docsify.ga) {
console.error('[Docsify] ga is required.');
return
}
window.$docsify.plugins = [].concat(function (hook) {
hook.init(collect);
hook.beforeEach(collect);
}, window.$docsify.plugins);
hook.beforeEach(collect);
};
var ga = install();
return ga;
window.$docsify.plugins = [].concat(install, window.$docsify.plugins);
}());