Skip to main content
Checks for elements that would be hidden by common adblockers
Rule IDadblock/element-hiding
CategoryAdblock Detection
ScopePer-page
Severitywarning
Weight3/10

Solution

Elements matching adblock filter rules may be hidden for users with adblockers. This can affect ad revenue or hide legitimate content if element names/classes match ad patterns. Consider renaming CSS classes that unintentionally match ad-blocking patterns (like .ad-*, .banner, .sponsor).

Options

This rule supports the following configuration options:
OptionTypeDefaultDescription
maxMatchesToReportunknownundefinedMaximum matching elements to report in detail
listsunknownundefinedFilter lists to check against

Configuration Example

squirrel.toml
[rules."adblock/element-hiding"]
maxMatchesToReport = undefined
lists = undefined

Enable / Disable

Disable this rule

squirrel.toml
[rules]
disable = ["adblock/element-hiding"]

Disable all Adblock Detection rules

squirrel.toml
[rules]
disable = ["adblock/*"]

Enable only this rule

squirrel.toml
[rules]
enable = ["adblock/element-hiding"]
disable = ["*"]