mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-13 23:16:47 +00:00
feat(减少 checkNodeForAds 检测次数):
This commit is contained in:
@@ -42,11 +42,7 @@ function getNodesWithAdsByGoogleClass(node) {
|
||||
|
||||
// 检查节点及其子节点是否包含 adsbygoogle 类
|
||||
function checkNodeForAds(node) {
|
||||
if (
|
||||
node.nodeType === Node.ELEMENT_NODE &&
|
||||
node.tagName === 'INS' &&
|
||||
node.classList.contains('adsbygoogle')
|
||||
) {
|
||||
if (node.tagName === 'INS' && node.classList.contains('adsbygoogle')) {
|
||||
adsNodes.push(node)
|
||||
} else {
|
||||
// 递归检查子节点
|
||||
|
||||
Reference in New Issue
Block a user