update (event) {
        let majorTrackingNetworks = constants.majorTrackingNetworks
        let IPRegex = /[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}/

        if (event.hasHTTPS) {
            this.hasHTTPS = true
        } else if (event.trackerBlocked) {
            // tracker is from one of the top blocked companies
            if (majorTrackingNetworks[event.trackerBlocked.parentCompany]) {
                this.inMajorTrackingNetwork = true
            }

            // trackers with IP address
            if (event.trackerBlocked.url.match(IPRegex)) {
                this.hasObscureTracker = true
            }

            this.totalBlocked++
        }
    }
/*
     * Update the score attruibues as new events come in. The actual
     * site score is calculated later when you call .get()
     */
Update the score attruibues as new events come in. The actual
site score is calculated later when you call .get()
Update the score attruibues as new events come in . The actual site score is calculated later when you call . get ()
update (event) {
        let majorTrackingNetworks = constants.majorTrackingNetworks
        let IPRegex = /[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}/
        if (event.hasHTTPS) {
            this.hasHTTPS = true
        } else if (event.trackerBlocked) {
            if (majorTrackingNetworks[event.trackerBlocked.parentCompany]) {
                this.inMajorTrackingNetwork = true
            }
            if (event.trackerBlocked.url.match(IPRegex)) {
                this.hasObscureTracker = true
            }
            this.totalBlocked++
        }
    }
update ( event ) { let majorTrackingNetworks = constants . majorTrackingNetworks let IPRegex = / [0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3} / if ( event . hasHTTPS ) { this . hasHTTPS = true } else if ( event . trackerBlocked ) { if ( majorTrackingNetworks [ event . trackerBlocked . parentCompany ] ) { this . inMajorTrackingNetwork = true } if ( event . trackerBlocked . url . match ( IPRegex ) ) { this . hasObscureTracker = true } this . totalBlocked ++ } }
Update the score attruibues as new events come in.
Update the score attruibues as new events come in .
// tracker is from one of the top blocked companies // trackers with IP address