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

Detect when AdBlock running and ask the user to disable it #57

Closed
arikfr opened this issue Jan 22, 2014 · 10 comments
Closed

Detect when AdBlock running and ask the user to disable it #57

arikfr opened this issue Jan 22, 2014 · 10 comments

Comments

@arikfr
Copy link
Member

arikfr commented Jan 22, 2014

AdBlock has false alarms on some of the AJAX calls re:dash makes (for example when a dashboard slug begins with "advertising-"). We need to detect if AdBlock runs and show a warning to the user.

@clarkbw
Copy link

clarkbw commented Nov 4, 2016

What do you think about using the following solution for this? code via blog I'll need to do some testing that this approach still works with most adblockers.

(function(){
  var test = document.createElement('div');
  test.innerHTML = ' ';
  test.className = 'adsbox';
  document.body.appendChild(test);
  window.setTimeout(function() {
    if (test.offsetHeight === 0) {
      document.body.classList.add('adblock');
    }
    test.remove();
  }, 100);

I was thinking that somewhere in the navbar, navbar-right, the test element displays if you have adblock enabled otherwise remains hidden. This code should all be async and on a timeout so it doesn't block anything.

What do you think about this approach?

@arikfr
Copy link
Member Author

arikfr commented Nov 4, 2016

If it works, sounds good to me. Need to figure out how to display the message to the user without annoying him. :) But maybe a warning icon in the navbar that when clicked will explain that you he disable AdBlock.

I only wonder if we should allow the user to dismiss the message without disabling adblock? And if we do, how to store this setting?

@clarkbw
Copy link

clarkbw commented Nov 4, 2016

If it works, sounds good to me. Need to figure out how to display the message to the user without annoying him. :) But maybe a warning icon in the navbar that when clicked will explain that you he disable AdBlock.

Do you think a popup or other page is the right solution here? I don't know what the most consistent system would be here.

I only wonder if we should allow the user to dismiss the message without disabling adblock? And if we do, how to store this setting?

I was wondering this as well. If we did some kind of icon with a popup and allowed people to ignore it I think we'd need to save that either in cookies or profile db.

@arikfr
Copy link
Member Author

arikfr commented Nov 4, 2016

Do you think a popup or other page is the right solution here? I don't know what the most consistent system would be here.

Popup seemed right to me as you want to explain to the user what's the problem but not take too much screen real estate for it. Also thought about the fact that the user might fix/dismiss it on one browser but have it again in another.

Considering that it's a non issue for most, how about we show a small message in the footer when we detect ad blocking:

⚠️ You seem to have ad blocking extension enabled. ❔

And when you hover the ? it will show a bubble with explanation?

@clarkbw
Copy link

clarkbw commented Nov 4, 2016

Considering that it's a non issue for most, how about we show a small message in the footer when we detect ad blocking:

Sounds good.

@clarkbw
Copy link

clarkbw commented Nov 4, 2016

Having trouble getting started with Vagrant on the Mac. Spent too much time there, will have to come back to this later. Let me know if there are updated docs somewhere.

@arikfr
Copy link
Member Author

arikfr commented Dec 21, 2016

Sorry for the issues you had w/ the Vagrant box, I opened #1480 to track the work on the dev guide.

@arikfr
Copy link
Member Author

arikfr commented Jan 26, 2017

@clarkbw The developer guide has been updated along with new documentation on how to use Docker for easy setup of your dev environment (instead of Vagrant).

https://redash.io/help-onpremise/dev/guide.html

Also, once Mozilla will have recent version of Redash deployed on s.t.m.o, you will be able to use it instead of running things locally: https://redash.io/help-onpremise/dev/remote-server.html (while only having frontend stuff run locally).

washort pushed a commit to washort/redash that referenced this issue Jul 25, 2017
getredash#57

I tried to make
`JSON.stringify(this.visualization.options.columnMapping)` a variable
to avoid repeating it, but if I make it a `let` the linter throws an
error and if I make it a `const` then it doesn’t change with the UI and
the logic doesn’t work. :(
washort pushed a commit to washort/redash that referenced this issue Jul 25, 2017
getredash#57

I tried to make
`JSON.stringify(this.visualization.options.columnMapping)` a variable
to avoid repeating it, but if I make it a `let` the linter throws an
error and if I make it a `const` then it doesn’t change with the UI and
the logic doesn’t work. :(
washort pushed a commit to washort/redash that referenced this issue Dec 8, 2017
getredash#57

I tried to make
`JSON.stringify(this.visualization.options.columnMapping)` a variable
to avoid repeating it, but if I make it a `let` the linter throws an
error and if I make it a `const` then it doesn’t change with the UI and
the logic doesn’t work. :(
washort pushed a commit to washort/redash that referenced this issue Dec 13, 2017
I tried to make
`JSON.stringify(this.visualization.options.columnMapping)` a variable
to avoid repeating it, but if I make it a `let` the linter throws an
error and if I make it a `const` then it doesn’t change with the UI and
the logic doesn’t work. :(

updated based on PR comments
washort pushed a commit to washort/redash that referenced this issue Jan 8, 2018
I tried to make
`JSON.stringify(this.visualization.options.columnMapping)` a variable
to avoid repeating it, but if I make it a `let` the linter throws an
error and if I make it a `const` then it doesn’t change with the UI and
the logic doesn’t work. :(

updated based on PR comments
washort pushed a commit to washort/redash that referenced this issue Jan 9, 2018
I tried to make
`JSON.stringify(this.visualization.options.columnMapping)` a variable
to avoid repeating it, but if I make it a `let` the linter throws an
error and if I make it a `const` then it doesn’t change with the UI and
the logic doesn’t work. :(

updated based on PR comments
washort pushed a commit to washort/redash that referenced this issue Apr 30, 2018
I tried to make
`JSON.stringify(this.visualization.options.columnMapping)` a variable
to avoid repeating it, but if I make it a `let` the linter throws an
error and if I make it a `const` then it doesn’t change with the UI and
the logic doesn’t work. :(

updated based on PR comments
washort pushed a commit to washort/redash that referenced this issue May 31, 2018
I tried to make
`JSON.stringify(this.visualization.options.columnMapping)` a variable
to avoid repeating it, but if I make it a `let` the linter throws an
error and if I make it a `const` then it doesn’t change with the UI and
the logic doesn’t work. :(

updated based on PR comments
washort pushed a commit to washort/redash that referenced this issue Aug 11, 2018
I tried to make
`JSON.stringify(this.visualization.options.columnMapping)` a variable
to avoid repeating it, but if I make it a `let` the linter throws an
error and if I make it a `const` then it doesn’t change with the UI and
the logic doesn’t work. :(

updated based on PR comments
alison985 added a commit to StantonVentures/redash that referenced this issue Aug 19, 2018
I tried to make
`JSON.stringify(this.visualization.options.columnMapping)` a variable
to avoid repeating it, but if I make it a `let` the linter throws an
error and if I make it a `const` then it doesn’t change with the UI and
the logic doesn’t work. :(

updated based on PR comments
washort pushed a commit to washort/redash that referenced this issue Mar 5, 2019
I tried to make
`JSON.stringify(this.visualization.options.columnMapping)` a variable
to avoid repeating it, but if I make it a `let` the linter throws an
error and if I make it a `const` then it doesn’t change with the UI and
the logic doesn’t work. :(

updated based on PR comments
justinclift pushed a commit to junnplus/redash that referenced this issue Jun 24, 2023
Update boto3 and botocore dependencies
@eradman
Copy link
Collaborator

eradman commented May 2, 2024

This issue is old, and almost certainly the world of Ad-blocking has evolved. Closing, but we can re-evaluate if any user starts a ticket with current examples of this problem.

@eradman eradman closed this as completed May 2, 2024
@justinclift
Copy link
Member

Yep, sounds like a decent plan. 😄

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

No branches or pull requests

4 participants