Skip to content

Commit

Permalink
Remove unused TrackingProtectionStats dead code (#41)
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanKingston authored Dec 14, 2021
1 parent 6d0dc34 commit 1adeb94
Showing 1 changed file with 0 additions and 29 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -175,32 +175,6 @@
}

function install () {
Object.defineProperty(window.__firefox__, 'TrackingProtectionStats', {
enumerable: false,
configurable: false,
writable: false,
value: { enabled: false }
})

Object.defineProperty(window.__firefox__.TrackingProtectionStats, 'setEnabled', {
enumerable: false,
configurable: false,
writable: false,
value: function (enabled, securityToken) {
if (securityToken !== SECURITY_TOKEN) {
return
}

if (enabled === window.__firefox__.TrackingProtectionStats.enabled) {
return
}

window.__firefox__.TrackingProtectionStats.enabled = enabled

injectStatsTracking(enabled)
}
})

function sendMessage (url, resourceType) {
if (url) {
webkit.messageHandlers.processRule.postMessage({
Expand Down Expand Up @@ -355,9 +329,6 @@
})
}

// Default to on because there is a delay in being able to enable/disable
// from native, and we don't want to miss events
window.__firefox__.TrackingProtectionStats.enabled = true
injectStatsTracking(true)
}
})()

0 comments on commit 1adeb94

Please sign in to comment.