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

Disable the ad block nag for ad-free projects #4329

Merged
merged 3 commits into from
Jul 16, 2018

Conversation

davidfischer
Copy link
Contributor

This PR disables the ad block nag if the project is ad free by setting a flag in READTHEDOCS_DATA. There is still a server side API call to get the ad which checks whether a user or project has gone Gold. This call can be blocked by some ad blockers.

There will be a corresponding PR in the sphinx build extensions: https://github.com/rtfd/readthedocs-sphinx-ext

Fixes #4218 for ad-free projects. Ad-free users will still need to disable their ad blocker.

@davidfischer davidfischer requested a review from a team July 5, 2018 18:36
@davidfischer davidfischer removed the PR: work in progress Pull request is not ready for full review label Jul 5, 2018
Copy link
Member

@ericholscher ericholscher left a comment

Choose a reason for hiding this comment

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

Ah, this addresses my other comment in the previous PR :)

@davidfischer davidfischer merged commit 09f19a4 into master Jul 16, 2018
@davidfischer davidfischer deleted the davidfischer/no-nag-for-adfree-projects branch July 16, 2018 17:28
@@ -261,7 +261,7 @@ function init() {
error: function (xhr, textStatus, errorThrown) {
console.error('Error loading Read the Docs promo');

if (xhr && xhr.status === 404 && rtd.api_host === 'https://readthedocs.org') {
if (!rtddata.ad_free && xhr && xhr.status === 404 && rtd.api_host === 'https://readthedocs.org') {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This should have been rtd.ad_free. How did this ever work?

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