feat: 新增 Microsoft Clarity

feat: 新增 Cloudflare Analytics
feat: aside 個人資料widget可關閉button
fix: 修復medium zoom 報錯的 bugs
This commit is contained in:
Jerry
2020-12-25 16:52:49 +08:00
Unverified
parent d5d5681981
commit 80c03b15b1
7 changed files with 34 additions and 6 deletions

View File

@@ -280,7 +280,7 @@ document.addEventListener('DOMContentLoaded', function () {
const addMediumZoom = () => {
const zoom = mediumZoom(document.querySelectorAll('#article-container :not(a)>img'))
zoom.on('open', e => {
const photoBg = $(document.documentElement).attr('data-theme') === 'dark' ? '#121212' : '#fff'
const photoBg = document.documentElement.getAttribute('data-theme') === 'dark' ? '#121212' : '#fff'
zoom.update({
background: photoBg
})