Skip to content

Commit

Permalink
Remove unused TrackingProtectionStats dead code (#311)
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanKingston authored Nov 8, 2021
1 parent b09433f commit 7837129
Showing 1 changed file with 0 additions and 29 deletions.
29 changes: 0 additions & 29 deletions DuckDuckGo/ContentBlocker/contentblockerrules.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,32 +78,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) {
const pageUrl = window.location.href
Expand Down Expand Up @@ -258,9 +232,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 7837129

Please sign in to comment.