lars, it's kinda impossible to build an undetectable ad blocker. If an ad fails to load, this affects the page layout, and that can be detected from JS by checking the sizes of the elements and/or traversing the DOM tree. Also onload/onerror events for ad-related scripts. Also the absence of global variables these scripts define. And simplest of them all — just try to load a URL that has ad-related words in it and see whether the request fails.