Check whether user has a Chrome extension installed

前端 未结 16 2098
一向
一向 2020-11-22 08:50

I am in the process of building a Chrome extension, and for the whole thing to work the way I would like it to, I need an external JavaScript script to be able to detect if

16条回答
  •  旧时难觅i
    2020-11-22 09:17

    Your extension could interact with the website (e.g. changing variables) and your website could detect this.

    But there should be a better way to do this. I wonder how Google is doing it on their extension gallery (already installed applications are marked).

    Edit:

    The gallery use the chrome.management.get function. Example:

    chrome.management.get("mblbciejcodpealifnhfjbdlkedplodp", function(a){console.log(a);});
    

    But you can only access the method from pages with the right permissions.

提交回复
热议问题