Skip to content

Commit

Permalink
bump: 3.0.0 close #78
Browse files Browse the repository at this point in the history
  • Loading branch information
QingWei-Li committed Feb 19, 2017
1 parent d355bb4 commit 74ce0bf
Show file tree
Hide file tree
Showing 10 changed files with 1,266 additions and 865 deletions.
1,771 changes: 1,104 additions & 667 deletions lib/docsify.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions lib/docsify.min.js

Large diffs are not rendered by default.

17 changes: 4 additions & 13 deletions lib/plugins/ga.js
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -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);

}());
2 changes: 1 addition & 1 deletion lib/plugins/ga.min.js

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

Loading

0 comments on commit 74ce0bf

Please sign in to comment.