mirror of
https://github.com/HighCapable/YukiHookAPI.git
synced 2025-09-08 11:34:32 +08:00
Rebuild docsify and delete docs caching code
This commit is contained in:
27
docs/lib/plugins/gitalk.js
Normal file
27
docs/lib/plugins/gitalk.js
Normal file
@@ -0,0 +1,27 @@
|
||||
(function () {
|
||||
/* eslint-disable no-unused-vars */
|
||||
function install(hook) {
|
||||
var dom = Docsify.dom;
|
||||
|
||||
hook.mounted(function (_) {
|
||||
var div = dom.create('div');
|
||||
div.id = 'gitalk-container';
|
||||
var main = dom.getNode('#main');
|
||||
div.style = "width: " + (main.clientWidth) + "px; margin: 0 auto 20px;";
|
||||
dom.appendTo(dom.find('.content'), div);
|
||||
});
|
||||
|
||||
hook.doneEach(function (_) {
|
||||
var el = document.getElementById('gitalk-container');
|
||||
while (el.hasChildNodes()) {
|
||||
el.removeChild(el.firstChild);
|
||||
}
|
||||
|
||||
// eslint-disable-next-line
|
||||
gitalk.render('gitalk-container');
|
||||
});
|
||||
}
|
||||
|
||||
$docsify.plugins = [].concat(install, $docsify.plugins);
|
||||
|
||||
}());
|
Reference in New Issue
Block a user