title: Uncaught (in promise) ReferenceError: window is not defined in google chrome extension
body: <p>it the <a href="https://github.com/fingerprintjs/fingerprintjs" rel="nofollow noreferrer">fingerpints</a> did not support google chrome extension? When I get visit id like this:</p>
  <pre><code>const DeviceHandler = {
      getDeviceId: async (): Promise&lt;string&gt; =&gt; {
          return new Promise((resolve, reject) =&gt; {
              const fpPromise = require('@fingerprintjs/fingerprintjs').load();
              fpPromise
                  .then((fp: { get: () =&gt; any; }) =&gt; fp.get())
                  .then(async (result: { visitorId: any; }) =&gt; {
                      // This is the visitor identifier:
                      const deviceId = result.visitorId;
                      resolve(deviceId);
                  });
          });
      }
  };
  
  export default DeviceHandler;
  </code></pre>
  <p>shows error in the <code>background.js</code>:</p>
  <pre><code>Uncaught (in promise) ReferenceError: window is not defined
  </code></pre>
  <p>this is the function that throws error in fingerprints <code>&quot;@fingerprintjs/fingerprintjs&quot;: &quot;^3.3.2&quot;,</code>:</p>
  <pre><code>/**
   * Sends an unpersonalized AJAX request to collect installation statistics
   */
  function monitor() {
      // The FingerprintJS CDN (https://github.com/fingerprintjs/cdn) replaces `window.__fpjs_d_m` with `true`
      if (window.__fpjs_d_m || Math.random() &gt;= 0.01) {
          return;
      }
      try {
          var request = new XMLHttpRequest();
          request.open('get', &quot;https://openfpcdn.io/fingerprintjs/v&quot; + version + &quot;/npm-monitoring&quot;, true);
          request.send();
      }
      catch (error) {
          // console.error is ok here because it's an unexpected error handler
          // eslint-disable-next-line no-console
          console.error(error);
      }
  }
  </code></pre>