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
Merged

Conversation

@davidfischer
Copy link
Contributor

@davidfischer davidfischer commented Aug 16, 2018

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 Aug 16, 2018
Copy link
Member

@humitos humitos left a comment

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

@davidfischer davidfischer commented Aug 17, 2018

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 humitos commented Aug 17, 2018

Feel free to merge.

@davidfischer
Copy link
Contributor Author

@davidfischer davidfischer commented Aug 17, 2018

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
1 check passed
@stsewd stsewd deleted the davidfischer/better-ad-block-detection branch Aug 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants