Chrome Extension: How to detect if an extension is installed using Content Scripts

后端 未结 3 1972
小蘑菇
小蘑菇 2020-12-21 15:19

I am asking this question after looking at several related questions on stackoverflow. I started with how to detect if an extension is installed. I opted for the method wher

3条回答
  •  梦毁少年i
    2020-12-21 15:37

    It looks like your own the extension and website, in which case it would be much easier to use Inline Installation.

    if (typeof chrome !== "undefined" && typeof chrome.app !== "undefined" && chrome.app.isInstalled) {
      // extension is installed.
    }
    

提交回复
热议问题