From 237a40d55d7d5754dbf28164dc7dc12d6cf2a1d9 Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Sat, 25 Nov 2023 18:50:11 +0000 Subject: [PATCH] Deployed a3fcc3ef to v0.8.2 with MkDocs 1.5.3 and mike 1.1.2 --- v0.8.2/scripts/extra.js | 29 ++++++++++++++++++++++++++--- v0.8.2/sitemap.xml.gz | Bin 1160 -> 1160 bytes v0.8.2/stylesheets/extra.css | 4 ++++ 3 files changed, 30 insertions(+), 3 deletions(-) diff --git a/v0.8.2/scripts/extra.js b/v0.8.2/scripts/extra.js index 0a5a3ad85..8383e85e6 100644 --- a/v0.8.2/scripts/extra.js +++ b/v0.8.2/scripts/extra.js @@ -1,12 +1,35 @@ var glimeScript; +var glimeStyles = []; document$.subscribe(function () { if (!glimeScript) { glimeScript = document.createElement("script"); - glimeScript.setAttribute("data", "name: 'glime'"); glimeScript.setAttribute("src", "https://cdn.glimelab.ai/widget/1.0.0/widget.js"); - glimeScript.setAttribute("onload", 'window.glime.init("Bl3mlvfCnTnRm5");'); + glimeScript.setAttribute("onload", "onGlimeLoad()"); document.head.appendChild(glimeScript); } else { - // window.glime.init("Bl3mlvfCnTnRm5"); + var newGlimeStyle = document.createElement("style"); + document.head.appendChild(newGlimeStyle); + var i = 0; + glimeStyles.forEach((rule) => { + newGlimeStyle.sheet.insertRule(rule.cssText, i); + i++; + }); } }); + +onGlimeLoad = () => { + window.glime.init("Bl3mlvfCnTnRm5"); + setTimeout(() => { + const sheets = document.styleSheets; + [...sheets].forEach((sheet) => { + if (!sheet.href) { + [...sheet.cssRules].forEach((rule) => { + if (!rule || rule.href || !rule.selectorText) return; + if (rule.selectorText.indexOf(".css-") === 0 || rule.selectorText.indexOf("glime") > -1) { + glimeStyles.push(rule); + } + }); + } + }); + }, 1000); +}; diff --git a/v0.8.2/sitemap.xml.gz b/v0.8.2/sitemap.xml.gz index 535a7d05fd5cf3599d4d4befe9dc30310c63fd9a..1e64a30ae0cb8505230dd731a0341c7377adfc03 100644 GIT binary patch delta 15 WcmeC+?BHaR@8;lm58w5iD delta 15 WcmeC+?BHaR@8;mxYPylFi3I>3(F6(r diff --git a/v0.8.2/stylesheets/extra.css b/v0.8.2/stylesheets/extra.css index f7a8217ef..e6bc9bf0c 100644 --- a/v0.8.2/stylesheets/extra.css +++ b/v0.8.2/stylesheets/extra.css @@ -18,3 +18,7 @@ border-color: var(--md-default-bg-color--lighter); } } + +#glimeRoot * { + font-family: var(--md-text-font) !important; +}