mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-14 07:26:52 +00:00
减少日志
This commit is contained in:
@@ -32,7 +32,6 @@ const DebugPanel = () => {
|
||||
}
|
||||
|
||||
function handleUpdateDebugTheme(newTheme) {
|
||||
console.log('切换主题', newTheme)
|
||||
const query = { ...router.query, theme: newTheme }
|
||||
router.push({ pathname: router.pathname, query })
|
||||
}
|
||||
|
||||
@@ -16,10 +16,8 @@ const Gitalk = ({ frontMatter }) => {
|
||||
// distractionFreeMode: JSON.parse(BLOG.COMMENT_GITALK_DISTRACTION_FREE_MODE)
|
||||
// }} />
|
||||
const loadGitalk = async() => {
|
||||
const css = await loadExternalResource(BLOG.COMMENT_GITALK_CSS_CDN_URL, 'css')
|
||||
const js = await loadExternalResource(BLOG.COMMENT_GITALK_JS_CDN_URL, 'js')
|
||||
|
||||
console.log('gitalk 加载成功', css, js)
|
||||
await loadExternalResource(BLOG.COMMENT_GITALK_CSS_CDN_URL, 'css')
|
||||
await loadExternalResource(BLOG.COMMENT_GITALK_JS_CDN_URL, 'js')
|
||||
const Gitalk = window.Gitalk
|
||||
|
||||
const gitalk = new Gitalk({
|
||||
|
||||
@@ -17,7 +17,6 @@ export default function GoogleAdsense() {
|
||||
setTimeout(() => {
|
||||
const ads = document.getElementsByClassName('adsbygoogle')
|
||||
const adsbygoogle = window.adsbygoogle
|
||||
console.log('google-ads', adsbygoogle)
|
||||
if (ads.length > 0) {
|
||||
for (let i = 0; i <= ads.length; i++) {
|
||||
try {
|
||||
|
||||
@@ -140,8 +140,8 @@ const renderMermaid = async() => {
|
||||
}
|
||||
if (needLoad) {
|
||||
loadExternalResource(BLOG.MERMAID_CDN, 'js').then(url => {
|
||||
// console.log('mermaid加载成功', url, mermaid)
|
||||
const mermaid = window.mermaid
|
||||
console.log('mermaid加载成功', url, mermaid)
|
||||
mermaid.contentLoaded()
|
||||
})
|
||||
}
|
||||
@@ -216,7 +216,6 @@ const fixCodeLineStyle = () => {
|
||||
setTimeout(() => {
|
||||
const preCodes = document.querySelectorAll('pre.notion-code')
|
||||
for (const preCode of preCodes) {
|
||||
// console.log('code', preCode)
|
||||
Prism.plugins.lineNumbers.resize(preCode)
|
||||
}
|
||||
}, 10)
|
||||
|
||||
@@ -27,7 +27,6 @@ const TwikooCommentCounter = (props) => {
|
||||
urls: posts?.map(post => post.slug), // 不包含协议、域名、参数的文章路径列表,必传参数
|
||||
includeReply: true // 评论数是否包括回复,默认:false
|
||||
}).then(function (res) {
|
||||
// console.log('查询', res)
|
||||
commentsData = res
|
||||
updateCommentCount()
|
||||
}).catch(function (err) {
|
||||
|
||||
@@ -5,8 +5,8 @@ import { useEffect } from 'react'
|
||||
const ValineComponent = ({ path }) => {
|
||||
const loadValine = async () => {
|
||||
try {
|
||||
const url = await loadExternalResource(BLOG.COMMENT_VALINE_CDN, 'js')
|
||||
console.log('valine 加载成功', url)
|
||||
await loadExternalResource(BLOG.COMMENT_VALINE_CDN, 'js')
|
||||
// console.log('valine 加载成功', url)
|
||||
const Valine = window.Valine
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const valine = new Valine({
|
||||
@@ -21,7 +21,6 @@ const ValineComponent = ({ path }) => {
|
||||
serverURLs: BLOG.COMMENT_VALINE_SERVER_URLS,
|
||||
visitor: true
|
||||
})
|
||||
console.log('初始化valine成功')
|
||||
} catch (error) {
|
||||
console.error('twikoo 加载失败', error)
|
||||
}
|
||||
|
||||
@@ -15,7 +15,6 @@ const GlobalContext = createContext()
|
||||
* @constructor
|
||||
*/
|
||||
export function GlobalContextProvider(props) {
|
||||
console.log('global', props)
|
||||
const { children, siteInfo, categoryOptions, tagOptions } = props
|
||||
const router = useRouter()
|
||||
const [lang, updateLang] = useState(BLOG.LANG) // 默认语言
|
||||
|
||||
@@ -16,7 +16,7 @@ function initRevolverMaps () {
|
||||
Promise.all([
|
||||
loadExternalResource('https://rf.revolvermaps.com/0/0/8.js?i=5jnp1havmh9&m=0&c=ff0000&cr1=ffffff&f=arial&l=33')
|
||||
]).then(() => {
|
||||
console.log('地图加载完成')
|
||||
// console.log('地图加载完成')
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user