mirror of
https://github.com/wahyd4/docsify.git
synced 2026-08-21 11:16:10 +10:00
chore: added new linter config (#1028)
* chore: added new linter config * chore: linting fixes * chore: refactore in linting config and minor linting fixes
This commit is contained in:
+13
-12
@@ -1,23 +1,24 @@
|
||||
/* eslint-disable no-unused-vars */
|
||||
function install(hook) {
|
||||
const dom = Docsify.dom
|
||||
const dom = Docsify.dom;
|
||||
|
||||
hook.mounted(_ => {
|
||||
const div = dom.create('div')
|
||||
div.id = 'gitalk-container'
|
||||
const main = dom.getNode('#main')
|
||||
div.style = `width: ${main.clientWidth}px; margin: 0 auto 20px;`
|
||||
dom.appendTo(dom.find('.content'), div)
|
||||
})
|
||||
const div = dom.create('div');
|
||||
div.id = 'gitalk-container';
|
||||
const main = dom.getNode('#main');
|
||||
div.style = `width: ${main.clientWidth}px; margin: 0 auto 20px;`;
|
||||
dom.appendTo(dom.find('.content'), div);
|
||||
});
|
||||
|
||||
hook.doneEach(_ => {
|
||||
const el = document.getElementById('gitalk-container')
|
||||
const el = document.getElementById('gitalk-container');
|
||||
while (el.hasChildNodes()) {
|
||||
el.removeChild(el.firstChild)
|
||||
el.removeChild(el.firstChild);
|
||||
}
|
||||
|
||||
// eslint-disable-next-line
|
||||
gitalk.render('gitalk-container')
|
||||
})
|
||||
gitalk.render('gitalk-container');
|
||||
});
|
||||
}
|
||||
|
||||
$docsify.plugins = [].concat(install, $docsify.plugins)
|
||||
$docsify.plugins = [].concat(install, $docsify.plugins);
|
||||
|
||||
Reference in New Issue
Block a user