mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-21 07:26:49 +00:00
feature:
不蒜子调整
This commit is contained in:
@@ -2,7 +2,6 @@ import lang from './lang'
|
||||
import { useContext, createContext, useState, useEffect } from 'react'
|
||||
import cookie from 'react-cookies'
|
||||
import Router from 'next/router'
|
||||
|
||||
const GlobalContext = createContext()
|
||||
|
||||
/**
|
||||
@@ -104,28 +103,6 @@ const initTheme = (theme, changeTheme) => {
|
||||
}
|
||||
}
|
||||
|
||||
export function handleRouteChange (url) {
|
||||
initGoogleAdsense()
|
||||
}
|
||||
|
||||
/**
|
||||
* 初始化谷歌广告
|
||||
*/
|
||||
function initGoogleAdsense () {
|
||||
const ads = document.getElementsByClassName('adsbygoogle').length
|
||||
const newAdsCount = ads
|
||||
if (newAdsCount > 0) {
|
||||
for (let i = 0; i <= newAdsCount; i++) {
|
||||
try {
|
||||
// eslint-disable-next-line no-undef
|
||||
(adsbygoogle = window.adsbygoogle || []).push({})
|
||||
} catch (e) {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 读取默认主题
|
||||
* @returns {*}
|
||||
|
||||
Reference in New Issue
Block a user