bump: 2.4.0

This commit is contained in:
qingwei.li 2017-02-13 23:07:54 +08:00
commit 44d7257691
4 changed files with 10 additions and 4 deletions

View file

@ -2818,6 +2818,7 @@ var Hook = function Hook () {
this.afterHooks = []; this.afterHooks = [];
this.initHooks = []; this.initHooks = [];
this.readyHooks = []; this.readyHooks = [];
this.doneEachHooks = [];
}; };
Hook.prototype.beforeEach = function beforeEach (fn) { Hook.prototype.beforeEach = function beforeEach (fn) {
@ -2828,6 +2829,10 @@ Hook.prototype.afterEach = function afterEach (fn) {
this.afterHooks.push(fn); this.afterHooks.push(fn);
}; };
Hook.prototype.doneEach = function doneEach (fn) {
this.doneEachHooks.push(fn);
};
Hook.prototype.init = function init (fn) { Hook.prototype.init = function init (fn) {
this.initHooks.push(fn); this.initHooks.push(fn);
}; };
@ -2991,6 +2996,7 @@ var Docsify = function () {
mainRender(function (_) { mainRender(function (_) {
scrollIntoView(); scrollIntoView();
activeLink('nav'); activeLink('nav');
window.Docsify.hook.emit('doneEach');
}); });
}; };

4
lib/docsify.min.js vendored

File diff suppressed because one or more lines are too long

View file

@ -290,7 +290,7 @@ var install = function () {
new SearchComponent(); new SearchComponent();
!isAuto && searchPlugin(); !isAuto && searchPlugin();
}); });
isAuto && hook.beforeEach(searchPlugin); isAuto && hook.doneEach(searchPlugin);
}, window.$docsify.plugins); }, window.$docsify.plugins);
}; };

File diff suppressed because one or more lines are too long