mirror of
https://github.com/McShelby/hugo-theme-relearn
synced 2025-04-30 14:05:33 +08:00
parent
7c97f7b610
commit
3dc2f9a629
@ -1478,6 +1478,14 @@ function updateTheme( detail ){
|
||||
}));
|
||||
}
|
||||
|
||||
(function(){
|
||||
window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', event => {
|
||||
initChroma( true );
|
||||
initMermaid( true );
|
||||
initOpenapi( true );
|
||||
});
|
||||
})();
|
||||
|
||||
function useMermaid( config ){
|
||||
if( !Object.assign ){
|
||||
// We don't support Mermaid for IE11 anyways, so bail out early
|
||||
@ -1665,9 +1673,3 @@ ready( function(){
|
||||
moveTopbarButtons();
|
||||
adjustEmptyTopbarContents();
|
||||
})();
|
||||
|
||||
(function(){
|
||||
window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', event => {
|
||||
initOpenapi( true );
|
||||
});
|
||||
})();
|
||||
|
Loading…
x
Reference in New Issue
Block a user