2019-10-09 14:47:08 +00:00
|
|
|
import addOptionsLink from './views/config-link'
|
2019-10-12 21:57:49 +00:00
|
|
|
import createSettings from './views/config-page/config-page'
|
|
|
|
import createEditor from './views/editor/editor'
|
2019-09-20 14:00:28 +00:00
|
|
|
|
2019-10-09 14:47:08 +00:00
|
|
|
addOptionsLink()
|
|
|
|
|
|
|
|
const convertedNodes = [
|
2019-10-12 21:57:49 +00:00
|
|
|
{ id: 'options', view: createSettings },
|
|
|
|
{ id: 'editor', view: createEditor },
|
2019-10-09 14:47:08 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
for (const { id, view } of convertedNodes) {
|
|
|
|
const node = document.getElementById(id)
|
|
|
|
if (node !== null) {
|
2019-10-12 21:57:49 +00:00
|
|
|
view(node)
|
2019-10-09 14:47:08 +00:00
|
|
|
}
|
2019-03-03 11:07:42 +00:00
|
|
|
}
|
2019-11-04 15:06:11 +00:00
|
|
|
|
|
|
|
if (document.querySelector('[class*=language-]')) {
|
|
|
|
import('./highlight-all')
|
|
|
|
}
|