Skip to content

Commit

Permalink
bump: 2.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
QingWei-Li committed Feb 13, 2017
1 parent c6f7602 commit 44d7257
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
6 changes: 6 additions & 0 deletions lib/docsify.js
Original file line number Diff line number Diff line change
Expand Up @@ -2818,6 +2818,7 @@ var Hook = function Hook () {
this.afterHooks = [];
this.initHooks = [];
this.readyHooks = [];
this.doneEachHooks = [];
};

Hook.prototype.beforeEach = function beforeEach (fn) {
Expand All @@ -2828,6 +2829,10 @@ Hook.prototype.afterEach = function afterEach (fn) {
this.afterHooks.push(fn);
};

Hook.prototype.doneEach = function doneEach (fn) {
this.doneEachHooks.push(fn);
};

Hook.prototype.init = function init (fn) {
this.initHooks.push(fn);
};
Expand Down Expand Up @@ -2991,6 +2996,7 @@ var Docsify = function () {
mainRender(function (_) {
scrollIntoView();
activeLink('nav');
window.Docsify.hook.emit('doneEach');
});
};

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

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/plugins/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ var install = function () {
new SearchComponent();
!isAuto && searchPlugin();
});
isAuto && hook.beforeEach(searchPlugin);
isAuto && hook.doneEach(searchPlugin);
}, window.$docsify.plugins);
};

Expand Down
2 changes: 1 addition & 1 deletion lib/plugins/search.min.js

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

0 comments on commit 44d7257

Please sign in to comment.