src/drivers/webextension/js/driver.js
/**
   * Anonymously send identified technologies to wappalyzer.com
   * This function can be disabled in the extension settings
   */
Anonymously send identified technologies to wappalyzer.com
This function can be disabled in the extension settings
Anonymously send identified technologies to wappalyzer . com This function can be disabled in the extension settings
async ping() {
    const tracking = await getOption('tracking', true)
    const termsAccepted =
      agent === 'chrome' || (await getOption('termsAccepted', false))
    if (tracking && termsAccepted) {
      const hostnames = Object.keys(Driver.cache.hostnames).reduce(
        (hostnames, hostname) => {
          const { url, language, detections, hits } = Driver.cache.hostnames[
            hostname
          ]
          if (
            !/((local|dev(elop(ment)?)?|stag(e|ing)?|preprod|test(ing)?|demo(shop)?|admin|cache)[.-]|localhost|google|\/admin|\.local|\.test|\.dev|127\.|0\.)/.test(
              hostname
            ) &&
            hits >= 3
          ) {
            hostnames[url] = hostnames[url] || {
              applications: resolve(detections).reduce(
                (technologies, { name, confidence, version }) => {
                  if (confidence === 100) {
                    technologies[name] = {
                      version,
                      hits,
                    }
                  }
                  return technologies
                },
                {}
              ),
              meta: {
                language,
              },
            }
          }
          return hostnames
        },
        {}
      )
      const count = Object.keys(hostnames).length
      if (count && (count >= 50 || Driver.lastPing < Date.now() - expiry)) {
        await Driver.post('https://api.wappalyzer.com/ping/v2/', hostnames)
        await setOption('hostnames', (Driver.cache.hostnames = {}))
        Driver.lastPing = Date.now()
      }
      if (Driver.cache.ads.length > 50) {
        await Driver.post('https://ad.wappalyzer.com/log/wp/', Driver.cache.ads)
        await setOption('ads', (Driver.cache.ads = []))
      }
    }
  }
async ping ( ) { const tracking = await getOption ( 'tracking' , true ) const termsAccepted = agent === 'chrome' || ( await getOption ( 'termsAccepted' , false ) ) if ( tracking && termsAccepted ) { const hostnames = Object . keys ( Driver . cache . hostnames ) . reduce ( ( hostnames , hostname ) => { const { url , language , detections , hits } = Driver . cache . hostnames [ hostname ] if ( ! / ((local|dev(elop(ment)?)?|stag(e|ing)?|preprod|test(ing)?|demo(shop)?|admin|cache)[.-]|localhost|google|\/admin|\.local|\.test|\.dev|127\.|0\.) / . test ( hostname ) && hits >= 3 ) { hostnames [ url ] = hostnames [ url ] || { applications : resolve ( detections ) . reduce ( ( technologies , { name , confidence , version } ) => { if ( confidence === 100 ) { technologies [ name ] = { version , hits , } } return technologies } , { } ) , meta : { language , } , } } return hostnames } , { } ) const count = Object . keys ( hostnames ) . length if ( count && ( count >= 50 || Driver . lastPing < Date . now ( ) - expiry ) ) { await Driver . post ( 'https://api.wappalyzer.com/ping/v2/' , hostnames ) await setOption ( 'hostnames' , ( Driver . cache . hostnames = { } ) ) Driver . lastPing = Date . now ( ) } if ( Driver . cache . ads . length > 50 ) { await Driver . post ( 'https://ad.wappalyzer.com/log/wp/' , Driver . cache . ads ) await setOption ( 'ads' , ( Driver . cache . ads = [ ] ) ) } } }
Anonymously send identified technologies to wappalyzer.com
 This function can be disabled in the extension settings
Anonymously send identified technologies to wappalyzer . com This function can be disabled in the extension settings
// eslint-disable-next-line standard/computed-property-even-spacing