fix mermaid
This commit is contained in:
parent
1105d5e939
commit
88481e9f0b
15 changed files with 59 additions and 47 deletions
|
@ -53,16 +53,14 @@ function switch_minima_theme(current, next) {
|
|||
|
||||
/** @param {string} theme */
|
||||
function switch_utterances_theme(theme) {
|
||||
if (!utterances) {
|
||||
utterances = document.querySelector('iframe.utterances-frame')
|
||||
}
|
||||
utterances =utterances || document.querySelector('iframe.utterances-frame')
|
||||
if (!utterances) return
|
||||
utterances.contentWindow.postMessage({ type: 'set-theme', theme }, 'https://utteranc.es')
|
||||
}
|
||||
|
||||
/** @param {string} theme */
|
||||
function switch_giscus_theme(theme) {
|
||||
if (!giscus) {
|
||||
giscus = document.querySelector('iframe.giscus-frame')
|
||||
}
|
||||
giscus = giscus || document.querySelector('iframe.giscus-frame')
|
||||
if (!giscus) return
|
||||
giscus.contentWindow.postMessage({giscus: {setConfig: {theme}}}, 'https://giscus.app')
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue