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

Projects
None yet
2 participants
@davidfischer
Contributor

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 rtfd/core Aug 16, 2018

@humitos

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

This comment has been minimized.

Show comment
Hide comment
@davidfischer

davidfischer Aug 17, 2018

Contributor

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.

Contributor

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

This comment has been minimized.

Show comment
Hide comment
@humitos

humitos Aug 17, 2018

Member

Feel free to merge.

Member

humitos commented Aug 17, 2018

Feel free to merge.

@davidfischer

This comment has been minimized.

Show comment
Hide comment
@davidfischer

davidfischer Aug 17, 2018

Contributor

Feel free to merge.

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

Contributor

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

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@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