Paul Fournel
Paul Fournel

Reputation: 11207

Can a website tell if you are using an Google Chrome extension?

I would like to know if a website can tell if an Google Chrome extension is used to auto-click on links and filling forms?

I know sometimes it is possible like for AdBlock, because it block content to be loaded. But what if the extension does the same as what a normal user would do?

I hope this question is not too vague?

Upvotes: 1

Views: 1664

Answers (1)

Okan Kocyigit
Okan Kocyigit

Reputation: 13421

There are some hacking methods like this. However, there is a new protection for extensions, web_accessible_resources, this restrict the files that can be used on context of a web page.

But this hacking method may still works if there is at least one web_accessible_resource

Let's say you want to detect if user is using AdBlock extension.

Unique ID of AdBlock is gighmmpiobklfepjocnamgkkbiglidom

If you look into manifest.json file of AdBlock extension (where are the extension files stored?), you will see there img/icon24.png is the one of the web_accessible_resource.

So if you run this code on your website, you can still detect if user is using AdBlock.

var detect = function(url, if_installed, if_not_installed) {
    var s = document.createElement('script');
    s.onerror = if_not_installed;
    s.onload = if_installed;
    document.body.appendChild(s);
    s.src = url;
}
detect('chrome-extension://gighmmpiobklfepjocnamgkkbiglidom/img/icon24.png', function() {alert("yes, this user has AdBlock");});

Upvotes: 2

Related Questions