0

I need to detect if the Adblock extension is installed on the user's browser.

I have seen similar question on SO, but most of them suggest to check if the DOM has been modified.

I would rather want to check if the extension is installed (maybe with Javascript ?) on the browser rather than check the DOM. How do i do this ?

Ankit Rustagi
  • 5,539
  • 12
  • 39
  • 70

1 Answers1

0

Try the global navigator.plugins variable. With a loop it should work. (JS)

Nice blog to the topic: http://webdevwonders.com/detecting-browser-plugins/

EDIT: For chrome you can try this if you now the APP GUID.

try {
    var appGUID = "nnbmlagghjjcbdhgmkedmbmedengocbn";
    a = new Image();
    a.src = "chrome-extension://"+appGUID+"/icon16.gif";
    if(a.width != 0) {
       //App installed!
    }
} catch(e) {
   //App not installed
}
Cracker0dks
  • 2,422
  • 1
  • 24
  • 39