简体   繁体   中英

How to detect chrome extensions whether it is installed in user browser

There are a lot of answers related to this question, but most of those answer information are deprecated years ago by chrome browser.

I need a working example, how to detect google chrome browser addon/extension which is installed in users browser using (javascript/any method).

If i use event detection, there is a addon called " Luminous: JavaScript events blocker " which blocks all event detection and bypass the events generated by javascript.

   <script>
(function(w, u){
  var intervalLuminous = null;
  var isLuminousInstalled = false;
  var setLuminousDetected = function(){
    isLuminousInstalled = true;
    alert('Luminous: JavaScript events blocker installed!');
  }
  var checkLuminous = function(){
    if (document.getElementById('luminous-options') || document.getElementById('luminous-data')) {
      clearInterval(intervalLuminous);
      setLuminousDetected();
    }
  }

  intervalLuminous = setInterval(function(){
    checkLuminous();
  }, 10);
  if(!intervalLuminous){
    setLuminousDetected();
  }

})(window, undefined);
</script>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM