Page 1 of 1
var w = window.open()
Posted: Fri Nov 29, 2013 7:30 pm
by Vegan
So instead of a javscript alter to pester adblocker users, I was wondering if opening a window with a message and and link would substitute
eg
var w = windows.open()
// document.write some HTML
Re: var w = window.open()
Posted: Sat Nov 30, 2013 3:11 am
by requinix
...What?
Re: var w = window.open()
Posted: Sat Nov 30, 2013 12:43 pm
by Eric!
I think he is talking about those javascripts that detect adblocker because the browser doesn't request an image. They often will alter the DOM somewhere to say "hey we need ads to pay for this site! Turn off your fricken adblocker". I think Vegan wants to basically make that a pop-up but with a new tab. But I didn't really see a question in there.
Re: var w = window.open()
Posted: Sun Dec 01, 2013 7:20 pm
by Vegan
i use a js file with one line
Code: Select all
document.write('<div id="tester">an advertisement</div>');
then I include it
Code: Select all
<script src="http://hardcore-games.azurewebsites.net/js/advertisement.js" type="text/javascript"></script>
then I can detect the ad blocker by checking in the menu
Code: Select all
<script type="text/javascript">
if (document.getElementById("tester") == undefined) {
alert("An ad blocker has been detected. Please remove the program to use this site. This is an ad supported small business.");
}
</script>
So instead I was thinking of using a window with a nag to disable the blocker along with maybe a option to subscribe
so the idea popped up so to speak
Re: var w = window.open()
Posted: Sun Dec 01, 2013 9:16 pm
by requinix
If they have ads blocked then they probably have popups blocked too.
Re: var w = window.open()
Posted: Sun Dec 01, 2013 11:31 pm
by Eric!
I've never tested it properly but I know that pop-ups get blocked, however sometimes new tabs don't. Maybe it has to do with the way the requested window is configured to open?
Re: var w = window.open()
Posted: Mon Dec 02, 2013 9:25 am
by Vegan
its a problem and I thought I would come here in the hope of finding solutions, after all the jerk who distributes the ad blocker is on my radar for extradition to face a raft of infringement charges that would leave him incarcerated for at least a millenia or 5
maybe I should make an example of him, I have the capacity and the ability and I practice law
Re: var w = window.open()
Posted: Mon Dec 02, 2013 4:36 pm
by Eric!
I don't want to get into the Ad Blocker debate.
The most common method is when you detect ad blocker is to change the DOM to present a begging/nagging message there on the space where the blank ad divs show up. For noscript users you just have to redirect them with a meta refresh tag.
Re: var w = window.open()
Posted: Mon Dec 02, 2013 4:47 pm
by Vincent Puglia
@vegan,
I keep my blocker up and for every site that I've run across that circumvents it, I have one less site that I visit. There are enough sites on the web offering the same material, that I don't need to deal with pop-ups, pop-unders, and scrolling divs that cover what I'm reading. If the ads stayed within a given area (right column, eg) fine, but I'm not going to be intimidated/tricked into clicking them (which is what many do)
Re: var w = window.open()
Posted: Mon Dec 02, 2013 9:21 pm
by Vegan
I have ads on my pages, but not so much that its hard to read the site. I have put a lot of work into it, and I need to eat too. Using ad-blockers takes the grub off a lot of tables.

working on the site
with the defenses I use right now, google does not even crawl the site
Re: var w = window.open()
Posted: Mon Dec 02, 2013 10:51 pm
by Eric!
I see you got that code from emoticode. I think it is a bit too strict. Have you tried some of the other
open source tools out there or doing a
CSS trick (see answers) to ask them to whitelist your site?
Re: var w = window.open()
Posted: Tue Dec 03, 2013 10:52 am
by Vegan
I am trying some other options, mainly so that google can crawl the site while giving adblock users the bums rush
seems to be outright pervasive now, on my site I estimate 90% or more block my ads etc