Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improved ad block detection #4532

Merged
merged 3 commits into from
Aug 17, 2018

Conversation

davidfischer
Copy link
Contributor

This improves our ad block detection to avoid any false positives that would show the ad block nag.

When the ad fails to load, we add an element which we can detect whether it is visible.

Fixes #4402.

@davidfischer davidfischer requested a review from a team August 16, 2018 20:30
Copy link
Member

@humitos humitos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The logic sounds good.

Since we are adding this element to the body just to test that it's not blocked, don't we need to remove it once we know that it's not blocked?

Also, I suppose that our class ethical-rtd will create an element always with a height > 0 even if it has only one char ( ).

@davidfischer
Copy link
Contributor Author

don't we need to remove it once we know that it's not blocked?

I suppose we could remove it regardless.

I suppose that our class ethical-rtd will create an element always with a height > 0 even if it has only one char ( ).

Correct.

@humitos
Copy link
Member

humitos commented Aug 17, 2018

Feel free to merge.

@davidfischer
Copy link
Contributor Author

Feel free to merge.

I'll make the changes. I also noticed that jquery doesn't correctly report status codes for JSONP. Cool...

@davidfischer davidfischer merged commit 5311ef3 into master Aug 17, 2018
@stsewd stsewd deleted the davidfischer/better-ad-block-detection branch August 17, 2018 18:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants