禁止复制文章功能,附带开关

This commit is contained in:
tangly1024.com
2023-08-02 16:37:40 +08:00
parent 86fd5adf59
commit 5942d28cca
16 changed files with 30 additions and 75 deletions

View File

@@ -29,13 +29,6 @@ export function GlobalContextProvider(props) {
initTheme()
}, [])
// 是否允许复制页面内容
useEffect(() => {
if (!BLOG.CAN_COPY) {
document.getElementsByTagName('html')[0].classList.add('forbid-copy')
}
}, [])
useEffect(() => {
const handleStart = (url) => {
NProgress.start()