summaryrefslogtreecommitdiffstats
path: root/static/assets/js/fuji.min.js
diff options
context:
space:
mode:
authoramzrk22020-06-03 13:58:49 +0800
committeramzrk22020-06-03 13:58:49 +0800
commit3df71601ae866aff9c2ae060ed1ac7407807fcc4 (patch)
treead34004b865f43aecf43d111b5586f592a1e05ba /static/assets/js/fuji.min.js
parente6afd04368f56af57b77f71be4dda5a4d9279a64 (diff)
downloadhugo-theme-fuji-3df71601ae866aff9c2ae060ed1ac7407807fcc4.tar.gz
hugo-theme-fuji-3df71601ae866aff9c2ae060ed1ac7407807fcc4.tar.bz2
hugo-theme-fuji-3df71601ae866aff9c2ae060ed1ac7407807fcc4.zip
New comment area & opt out of font awesome
Diffstat (limited to 'static/assets/js/fuji.min.js')
-rw-r--r--static/assets/js/fuji.min.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/static/assets/js/fuji.min.js b/static/assets/js/fuji.min.js
index 474d550..ff50c8a 100644
--- a/static/assets/js/fuji.min.js
+++ b/static/assets/js/fuji.min.js
@@ -1,2 +1,2 @@
-"use strict";function getNowTheme(){var e=document.body.getAttribute("data-theme");return"auto"===e?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":"dark"===e?"dark":"light"}function updateMeidumTheme(e){var t=getNowTheme();e&&(e.detach(),e="dark"===t?mediumZoom(".img-zoomable",{background:"#2f3136"}):mediumZoom(".img-zoomable",{background:"#fffffd"}))}function updateUtterancesTheme(e){var t=getNowTheme();e&&("dark"===t?e.contentWindow.postMessage({type:"set-theme",theme:"photon-dark"},"https://utteranc.es"):e.contentWindow.postMessage({type:"set-theme",theme:"github-light"},"https://utteranc.es"))}var mediumInst,checkUtterances,commentStatus,commentLoadingTime,commentCheckInterval;0<document.querySelectorAll(".sidebar-toc ul ul").length&&document.querySelectorAll(".sidebar-toc ul ul").forEach(function(e,t,o){e.setAttribute("style","display: none;")}),document.querySelector(".btn .btn-scroll-top").addEventListener("click",function(){document.documentElement.scrollTop=0}),mediumInst="dark"===getNowTheme()?mediumZoom(".img-zoomable",{background:"#2f3136"}):mediumZoom(".img-zoomable",{background:"#fffffd"}),document.querySelector(".post-loading")&&(checkUtterances=function(){document.querySelector(".post-comment .utterances")&&(commentStatus=document.querySelector(".post-comment .utterances").getAttribute("style")),commentStatus?(clearInterval(commentCheckInterval),updateUtterancesTheme(document.querySelector(".post-comment iframe")),document.querySelector(".post-loading").setAttribute("style","display: none;")):20<++commentLoadingTime&&(clearInterval(commentCheckInterval),document.querySelector(".post-comment").setAttribute("style","display: none;"),document.querySelector(".post-loading i").className="far fa-times-circle")},commentLoadingTime=0,commentCheckInterval=self.setInterval(checkUtterances,500)),document.querySelector(".btn .btn-toggle-mode").addEventListener("click",function(){var e=getNowTheme(),t=document.body.getAttribute("data-theme"),o=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";"auto"===t?(document.body.setAttribute("data-theme","light"===e?"dark":"light"),localStorage.setItem("fuji_data-theme","light"===e?"dark":"light")):"light"===t?(document.body.setAttribute("data-theme","dark"),localStorage.setItem("fuji_data-theme","dark"==o?"auto":"dark")):(document.body.setAttribute("data-theme","light"),localStorage.setItem("fuji_data-theme","light"==o?"auto":"light")),updateMeidumTheme(mediumInst),document.querySelector(".post-loading")&&commentStatus&&updateUtterancesTheme(document.querySelector(".post-comment iframe")),document.querySelector("#disqus_thread")&&"undefined"!=typeof DISQUS&&DISQUS.reset({reload:!0})});
+"use strict";function getNowTheme(){var e=document.body.getAttribute("data-theme");return"auto"===e?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":"dark"===e?"dark":"light"}function updateMeidumTheme(e){var t=getNowTheme();e&&(e.detach(),e="dark"===t?mediumZoom(".img-zoomable",{background:"#2f3136"}):mediumZoom(".img-zoomable",{background:"#fffffd"}))}function updateUtterancesTheme(e){var t=getNowTheme();e&&("dark"===t?e.contentWindow.postMessage({type:"set-theme",theme:"photon-dark"},"https://utteranc.es"):e.contentWindow.postMessage({type:"set-theme",theme:"github-light"},"https://utteranc.es"))}var mediumInst;document.querySelector("span.post-comment-notloaded").addEventListener("click",loadComment),0<document.querySelectorAll(".sidebar-toc ul ul").length&&document.querySelectorAll(".sidebar-toc ul ul").forEach(function(e,t,o){e.setAttribute("style","display: none;")}),document.querySelector(".btn .btn-scroll-top").addEventListener("click",function(){document.documentElement.scrollTop=0}),mediumInst="dark"===getNowTheme()?mediumZoom(".img-zoomable",{background:"#2f3136"}):mediumZoom(".img-zoomable",{background:"#fffffd"}),document.querySelector(".btn .btn-toggle-mode").addEventListener("click",function(){var e=getNowTheme(),t=document.body.getAttribute("data-theme"),o=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";"auto"===t?(document.body.setAttribute("data-theme","light"===e?"dark":"light"),localStorage.setItem("fuji_data-theme","light"===e?"dark":"light")):"light"===t?(document.body.setAttribute("data-theme","dark"),localStorage.setItem("fuji_data-theme","dark"==o?"auto":"dark")):(document.body.setAttribute("data-theme","light"),localStorage.setItem("fuji_data-theme","light"==o?"auto":"light")),updateMeidumTheme(mediumInst);var a=document.querySelector(".post-comment");document.querySelector("span.post-comment-notloaded").getAttribute("style")&&("utterances"===a.getAttribute("data-comment")&&updateUtterancesTheme(document.querySelector(".post-comment iframe")),"disqus"===a.getAttribute("data-comment")&&DISQUS.reset({reload:!0}))});
//# sourceMappingURL=fuji.min.js.map