From eeb952035ae02c86fc6a1e507158f59afb5365b3 Mon Sep 17 00:00:00 2001 From: crazywhalecc Date: Tue, 22 Dec 2020 16:31:16 +0800 Subject: [PATCH] update docs --- docs/javascripts/config.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/javascripts/config.js b/docs/javascripts/config.js index d8bb350f..b6abc718 100644 --- a/docs/javascripts/config.js +++ b/docs/javascripts/config.js @@ -54,12 +54,12 @@ name.textContent = s_theme s_primary=getCookie("_primary_color"); document.body.setAttribute("data-md-color-primary", s_primary); var name2 = document.querySelector("#__code_2 code span:nth-child(7)"); -if(s_primary !== null) name2.textContent = s_primary.replace("-", " "); +if(s_primary !== null && name2 !== null) name2.textContent = s_primary.replace("-", " "); s_accent=getCookie("_accent_color"); document.body.setAttribute("data-md-color-accent", s_accent); var name3 = document.querySelector("#__code_3 code span:nth-child(7)"); -if(s_accent !== null) name3.textContent = s_accent.replace("-", " "); +if(s_accent !== null && name3 !== null) name3.textContent = s_accent.replace("-", " "); setTimeout(() => { let ls = document.querySelectorAll("chat-box");