Remix.run Logo
austin-cheney 3 hours ago

> I’m not deeply familiar with what APIs are available for detecting extension

Here is what the article says:

Method 1

    async function c() {
      const e = [],
        t = r.map(({id: t, file: n}) => {
          return fetch(`chrome-extension://${t}/${n}`)
        });
      (await Promise.allSettled(t)).forEach((t, n) => {
        if ("fulfilled" === t.status && void 0 !== t.value) {
          const t = r[n];
          t && e.push(t.id);
        }
      });
      return e;
    }
Method 2

    async function(e) {
      const t = [];
      for (const {id: n, file: i} of r) {
        try {
          await fetch(`chrome-extension://${n}/${i}`) && t.push(n);
        } catch(e) {}
        e > 0 && await new Promise(t => setTimeout(t, e));
      }
      return t;
    }
The API is making an HTTP request to

    chrome-extension://${store_id}/${file_name}
There is then a second stage where they walk the DOM looking for text signatures and element attributes indicative of the store_id values

It looks like the user has the freedom to manage this by launching chrome with this flag: --disable-extensions

It also seems there is an extension for extension management to deny extension availability by web site: https://superuser.com/questions/1546186/enable-disable-chrom...