-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocsifyEva.js
More file actions
36 lines (35 loc) · 958 Bytes
/
docsifyEva.js
File metadata and controls
36 lines (35 loc) · 958 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
/*!
* docsify-evajs
* v0.1
* https://github.com/codetyphon/docsify-evajs
* (c) 2020-2021 codetyphon <codetyphon@outlook.com>
* MIT license
*/
!
function () {
"use strict";
window.DocsifyCopyCodePlugin = {
init: function () {
return function (o, e) {
o.ready(function () {
console.warn("evasj")
})
}
}
},
window.$docsify = window.$docsify || {},
window.$docsify.plugins = [function (hook, vm) {
console.log('?', hook, vm)
const jsarr = []
hook.doneEach(function (content) {
const codes = Array.apply(null, document.querySelectorAll('code.lang-evajs'))
console.log(codes)
for (const key in codes) {
const code = codes[key];
const js = code.innerText
eval(`(()=>{${js}})()`)
}
return content
});
}].concat(window.$docsify.plugins || [])
}();