
Show HN: Pesky Adblock – Blocks site access to visitors without an adblocker - flingo
https://gitgud.io/billyo/Pesky-Adblock
======
franciscop
This is overkill. If you are asuming adblockers will remove anything with the
id "adTeaser" (as per the code), just use that to display the message! No need
for the "setTimeout" or even Javascript:

    
    
        <div id="adTeaser" style="position: absolute; z-index: 10000; ...">
          Please turn on your <a href="https://github.com/gorhill/uBlock#ublock-origin">ad blocker</a> to continue browsing this site
        </div>

~~~
dmurray
This would still show the rest of the page though. The JavaScript solution
hides everything else by setting document.body.innerHTML.

~~~
franciscop
Sure, my mistake. Flip that "position:absolute" for "position:fixed". Note how
I wrote "z-index:..." to imply an element covering the whole page.

Also note that activating your adblock does not disable the message in the OP,
you'd also need to refresh the page since you are effectively removing the
body.

~~~
flingo
Do any adblockers block content before the page is reloaded? I thought it'd be
necessary to do network filtering.

------
pandasun
Current options:

1) Allow ads.

2) Block ads. (ea. uBlock Origin)

3) Block ad blocking users. (Javascript)

4) Block the block for ad blocking users. (Userscripts)

5) Block users who don't block ads. (Pesky Adblock)

The only one missing is blocking the blockade for blocking users who don't
block ads.

~~~
std_throwaway
There's another one:

Block ads AND block sites who don't block users who block ads BUT don't block
the block for ad blocking users. (about:blank)

------
recursive
So if I use a standards-compliant browser, I won't be able to see a site that
uses this. So I guess I just won't. I also don't visit sites that run annoying
ads. Congratulations on being annoying and not even getting money for it I
guess.

~~~
flingo
> So if I use a standards-compliant browser, I won't be able to see a site
> that uses this.

Yes, that is the point.

It is designed specifically to exclude people not using an adblocker.

~~~
recursive
Maybe this is art, in which case, fair play. But otherwise it seems like a
pointless purpose.

------
kyledrake
Made something similar a while ago. It probably needs some tuning:
[https://kyledrake.net/adblockbar/](https://kyledrake.net/adblockbar/)

~~~
flingo
Nice. Don't know how I feel about whether or not the script loads determining
if you have adblock. Does mean you can't change the filename.

------
cm2012
Isn't it hypocritical to annoy people into doing what _you_ want them to do?

~~~
genericid
If someone decides against using an ad blocker, they can't mind being annoyed
that much.

~~~
paulcole
I don't use an adblocker because I don't like feeling like I'm taking
something I'm not entitled to.

I don't like most of the ads I see, but I understand why they're there and
that they're the reason why I don't have to get out my credit card to visit
the sites I like.

Edit: Didn't realize that not being offended by ads was such a controversial
opinion here.

~~~
nyolfen
that's interesting, i do use an adblocker because i don't like companies with
business models oriented on surveillance and building profiles of my behavior
across the internet that they're not entitled to

~~~
paulcole
So it's OK to take the product of a business if you don't like their business
model? Why not just avoid visiting the sites you find so distasteful?

~~~
monochromatic
What contract did I sign agreeing to let ad companies access my eyeballs, let
alone surveil me, in exchange for looking at a webpage? If they want to block
me, they’re welcome to (or at least welcome to try), but I will cry zero tears
over their lost spying opportunities.

~~~
cm2012
When you order food at a restaurant, there's no contract either. Just an
implicit understanding by the restaurant owner and society that you'll pay at
the end.

~~~
cortesoft
No, it is a contract. There are prices on the menu, and you are agreeing to
that price when you ask for the item. Not all contracts need to be signed, but
they have to be somehow agreed to.

~~~
cm2012
Every website you visit has TOS. Facebook in particular has extremely clear
TOS, written in plain English, that everyone consents to. In Europe, most
websites explicitly ask for consent now. Doesn't seem very different to me.

~~~
ubernostrum
And all of those sites track you before you've even had a chance to see their
terms.

Facebook infamously tracked people who'd never had Facebook accounts (and
therefore had never agreed to Facebook's ToS), and now claims not to, but who
knows?

------
erickhill
This feels like a house of mirrors.

------
shurcooL
The adblocker I use is not visiting websites with annoying ads (much). High
quality websites tend to not have them.

~~~
meesterdude
what websites of the highest quality do you visit that are light on ads?

~~~
beefield
Wikipedia, Hacker News, Stack Overflow and maybe The Economist come to my
mind.

(Been planning for a while to set up my work laptop to access only a
whitelisted set of domains to avoid 1. Procastrination and 2. ads & tracking.)

------
stevefan1999
This is a good weapon against the "overfluxing" Internet advertisement.
Appreciate it.

------
rustler
Why am I not using custom AdBlock filters to block pesky social media users? I
need to go write a bunch of Mastodon filters now.

------
flingo
I don't know if linking to ublock origin specifically, is the right call. I
just did it because I prefer it, and I had to link to something. (otherwise it
kind of screws non-technical people)

Hopefully ublock lasts longer than this script does.

------
robbrown451
I'll admit this is funny, but....

I'm always curious what people are against ads would like the web to be.
Paywalls everywhere? Micropayments?

~~~
badsectoracula
The cat who left the bag is probably dead by now, but i'd like most of the
commercial aspect of the web to simply go away with the exception of paid
services that i actually seek myself (e.g. i'm fine with the web allowing me
to go to an eshop or egrocery to buy stuff, to a hosting provider to rent a
server, to a game developer/publisher to buy games, etc). I'd also be fine
with buying "magazines" in the form of ebooks (no annoying DRM though), be it
per-issue or a subscription, assuming of course the content quality is better
than what people would put out for free on their own time (but TBH i expect
people would put out quality content for free anyway). I know some would say
that this has been tried and it doesn't work, but this isn't really the case
because it hasn't been tried in an Internet without alternatives so we don't
really know how it'd pan out.

I do not expect any of this to ever happen.

~~~
robbrown451
Yeah well I guess I'm not too excited about ideas which expect elimination of
alternatives.

------
na85
This is the hero the web deserves. A web free of advertising and advertisers
is a web free of for-profit privacy violations as a service.

~~~
craftyguy
Now it becomes a cat/mouse game of for-profit privacy violations as a service,
where individuals (like OP) are pitted against super rich companies. A more
robust solution is probably required here.

~~~
mirimir
I wonder if one could mess with programmatic-ad auctions by introducing
infinite loops. Not from user space browsers, of course.

