diff options
author | amzrk2 | 2020-06-03 18:56:00 +0800 |
---|---|---|
committer | amzrk2 | 2020-06-03 18:56:00 +0800 |
commit | 2e9f1c5cb2ad0c74ddeeecf0afa533139464b54d (patch) | |
tree | 2dfb0df1add95f43c88f84c64e9f023f33e046eb /dist/fuji.min.js | |
parent | 8d885d353a6ca8c1312e6f5aab2f322844ac93a6 (diff) | |
download | hugo-theme-fuji-2e9f1c5cb2ad0c74ddeeecf0afa533139464b54d.tar.gz hugo-theme-fuji-2e9f1c5cb2ad0c74ddeeecf0afa533139464b54d.tar.bz2 hugo-theme-fuji-2e9f1c5cb2ad0c74ddeeecf0afa533139464b54d.zip |
Fix null pointer error
Diffstat (limited to 'dist/fuji.min.js')
-rw-r--r-- | dist/fuji.min.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/dist/fuji.min.js b/dist/fuji.min.js index ff50c8a..16ec46b 100644 --- a/dist/fuji.min.js +++ b/dist/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;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}))}); +"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"))}document.querySelector("span.post-comment-notloaded")&&document.querySelector("span.post-comment-notloaded").addEventListener("click",loadComment);var mediumInst,secondQueryOfToc=document.querySelectorAll(".sidebar-toc ul ul");0<secondQueryOfToc.length&&secondQueryOfToc.forEach(function(e,t,o){""===e.innerText&&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 |