mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-20 15:09:40 +00:00
部分参数配置化
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import BLOG from '@/blog.config'
|
||||
import { siteConfig } from '@/lib/config'
|
||||
import { useEffect } from 'react'
|
||||
|
||||
/**
|
||||
@@ -6,7 +6,7 @@ import { useEffect } from 'react'
|
||||
*/
|
||||
export default function DisableCopy() {
|
||||
useEffect(() => {
|
||||
if (!JSON.parse(BLOG.CAN_COPY)) {
|
||||
if (!JSON.parse(siteConfig('CAN_COPY'))) {
|
||||
// 全栈添加禁止复制的样式
|
||||
document.getElementsByTagName('html')[0].classList.add('forbid-copy')
|
||||
// 监听复制事件
|
||||
|
||||
Reference in New Issue
Block a user