Skip to content

Commit

Permalink
减少日志
Browse files Browse the repository at this point in the history
  • Loading branch information
tangly1024 committed Jul 28, 2023
1 parent beeed7f commit e1976aa
Show file tree
Hide file tree
Showing 8 changed files with 6 additions and 14 deletions.
1 change: 0 additions & 1 deletion components/DebugPanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ const DebugPanel = () => {
}

function handleUpdateDebugTheme(newTheme) {
console.log('切换主题', newTheme)
const query = { ...router.query, theme: newTheme }
router.push({ pathname: router.pathname, query })
}
Expand Down
6 changes: 2 additions & 4 deletions components/Gitalk.js
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down
1 change: 0 additions & 1 deletion components/GoogleAdsense.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
3 changes: 1 addition & 2 deletions components/PrismMac.js
Original file line number Diff line number Diff line change
Expand Up @@ -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()
})
}
Expand Down Expand Up @@ -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)
Expand Down
1 change: 0 additions & 1 deletion components/TwikooCommentCounter.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
5 changes: 2 additions & 3 deletions components/ValineComponent.js
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand All @@ -21,7 +21,6 @@ const ValineComponent = ({ path }) => {
serverURLs: BLOG.COMMENT_VALINE_SERVER_URLS,
visitor: true
})
console.log('初始化valine成功')
} catch (error) {
console.error('twikoo 加载失败', error)
}
Expand Down
1 change: 0 additions & 1 deletion lib/global.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) // 默认语言
Expand Down
2 changes: 1 addition & 1 deletion themes/medium/components/RevolverMaps.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ function initRevolverMaps () {
Promise.all([
loadExternalResource('https://rf.revolvermaps.com/0/0/8.js?i=5jnp1havmh9&amp;m=0&amp;c=ff0000&amp;cr1=ffffff&amp;f=arial&amp;l=33')
]).then(() => {
console.log('地图加载完成')
// console.log('地图加载完成')
})
}
}
Expand Down

0 comments on commit e1976aa

Please sign in to comment.