bump: 2.4.0
This commit is contained in:
parent
c6f760275c
commit
44d7257691
4 changed files with 10 additions and 4 deletions
|
|
@ -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
4
lib/docsify.min.js
vendored
File diff suppressed because one or more lines are too long
|
|
@ -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);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
2
lib/plugins/search.min.js
vendored
2
lib/plugins/search.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue