style: format js code
This commit is contained in:
parent
51d4d1cc43
commit
1243bcb7c8
|
@ -7,9 +7,9 @@ KEEP.initCodeBlockTools = () => {
|
||||||
wrapper.appendChild(this)
|
wrapper.appendChild(this)
|
||||||
}
|
}
|
||||||
|
|
||||||
const {style: codeCopyStyle} = KEEP.theme_config?.code_copy || {}
|
const { style: codeCopyStyle } = KEEP.theme_config?.code_copy || {}
|
||||||
const {style: codeBlockStyle} = KEEP.theme_config?.code_block || {}
|
const { style: codeBlockStyle } = KEEP.theme_config?.code_block || {}
|
||||||
const {style: codeBlockToolsStyle} = KEEP.theme_config?.code_block?.tools || {}
|
const { style: codeBlockToolsStyle } = KEEP.theme_config?.code_block?.tools || {}
|
||||||
|
|
||||||
const isMac = (codeCopyStyle || codeBlockStyle || codeBlockToolsStyle || 'default') === 'mac'
|
const isMac = (codeCopyStyle || codeBlockStyle || codeBlockToolsStyle || 'default') === 'mac'
|
||||||
const foldedIconClassName = isMac ? 'fas fa-chevron-left' : 'fas fa-chevron-right'
|
const foldedIconClassName = isMac ? 'fas fa-chevron-left' : 'fas fa-chevron-right'
|
||||||
|
|
|
@ -56,7 +56,11 @@ window.addEventListener('DOMContentLoaded', () => {
|
||||||
KEEP.initLocalSearch()
|
KEEP.initLocalSearch()
|
||||||
}
|
}
|
||||||
|
|
||||||
if (code_block?.tools?.enable === true || code_block?.enable === true || code_copy?.enable === true) {
|
if (
|
||||||
|
code_block?.tools?.enable === true ||
|
||||||
|
code_block?.enable === true ||
|
||||||
|
code_copy?.enable === true
|
||||||
|
) {
|
||||||
KEEP.initCodeBlockTools()
|
KEEP.initCodeBlockTools()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue