vitepress-plugin-comment-with-giscus
Advanced tools
Comparing version 1.1.10 to 1.1.11
@@ -50,3 +50,3 @@ import giscus from '@giscus/vue'; | ||
} | ||
const dark = !!document.querySelector('html')?.className; | ||
const isDark = document.querySelector('html')?.className.indexOf('dark') !== -1; | ||
// Get the parent container and create a comment container | ||
@@ -71,3 +71,3 @@ // 获取父容器,并创建评论容器 | ||
render: () => { | ||
return h(giscus, { ...defaultProps, theme: dark ? darkTheme : lightTheme, ...props }); | ||
return h(giscus, { ...defaultProps, theme: isDark ? darkTheme : lightTheme, ...props }); | ||
} | ||
@@ -74,0 +74,0 @@ }).mount('#giscus'); |
@@ -62,3 +62,3 @@ import giscus from '@giscus/vue'; | ||
} | ||
const dark: boolean = !!document.querySelector('html')?.className; | ||
const isDark:boolean = document.querySelector('html')?.className.indexOf('dark') !== -1; | ||
// Get the parent container and create a comment container | ||
@@ -84,3 +84,3 @@ // 获取父容器,并创建评论容器 | ||
return h( | ||
(giscus as Component), { ...defaultProps, theme: dark ? darkTheme : lightTheme, ...props } | ||
(giscus as Component), { ...defaultProps, theme: isDark ? darkTheme : lightTheme, ...props } | ||
); | ||
@@ -87,0 +87,0 @@ } |
{ | ||
"name": "vitepress-plugin-comment-with-giscus", | ||
"version": "1.1.10", | ||
"version": "1.1.11", | ||
"description": "vitepress comment plugin based on giscus", | ||
@@ -5,0 +5,0 @@ "type": "module", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
13926