Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/duckduckgo/duckduckgo-privacy-extension
/ functions
Functions
952 in github.com/duckduckgo/duckduckgo-privacy-extension
⨍
Functions
952
◇
Types & classes
118
↓ 110 callers
Method
get
* Called using either a chrome tab object or by id * get({tabId: ###}); * @returns {Tab|undefined}
shared/js/background/tab-manager.js:104
↓ 99 callers
Method
getSetting
(key)
unit-test/helpers/mocks.js:10
↓ 88 callers
Method
isSubFeatureEnabled
* @param {string} featureName * @param {string} subFeatureName * @param {string} [cohortName] * @returns {boolean}
shared/js/background/components/remote-config.js:120
↓ 84 callers
Method
has
(id)
shared/js/background/tab-manager.js:95
↓ 83 callers
Method
set
(property, val)
shared/js/background/classes/company.js:21
↓ 79 callers
Method
updateConfig
* * @param {Config} configValue
shared/js/background/components/remote-config.js:90
↓ 65 callers
Method
isFeatureEnabled
* Checks different toggles we have in the application: * - User toggle off * - Remotely disable it * - tempAllowlist * -
shared/js/background/classes/site.js:168
↓ 63 callers
Function
generateDNRRule
* Generates a declarativeNetRequest rule with the given details. * * @overload * @param {Omit<generateDNRRuleDetails, 'id'>} ruleDetails * @return
packages/ddg2dnr/lib/utils.js:174
↓ 60 callers
Method
updateSetting
(key, value)
unit-test/helpers/mocks.js:13
↓ 59 callers
Function
addDomain
(blockList, domain, entity, defaultAction, rules)
packages/ddg2dnr/test/tds.js:26
↓ 41 callers
Method
ready
()
shared/js/background/components/tds.js:50
↓ 40 callers
Method
add
(el)
shared/js/background/classes/top-blocked.js:6
↓ 40 callers
Method
url
()
shared/js/background/classes/tab.js:135
↓ 36 callers
Method
increment
* @param {string} key * @param {number} [now] optional timestamp to use as the current time
shared/js/background/classes/tracker-stats.js:46
↓ 35 callers
Function
beforeEach
()
packages/ddg2dnr/test/utils/hooks.js:12
↓ 34 callers
Method
create
(tabData)
shared/js/background/tab-manager.js:49
↓ 33 callers
Method
setValue
* @template {InstanceType<typeof TabState>} T * @template {keyof T} K * @param {K} key * @param {T[K]} value
shared/js/background/classes/tab-state.js:90
↓ 31 callers
Function
emptyBlockList
()
packages/ddg2dnr/test/utils/helpers.js:94
↓ 30 callers
Function
beforeAll
()
packages/ddg2dnr/test/utils/hooks.js:4
↓ 30 callers
Function
registerMessageHandler
(name, func)
shared/js/background/message-registry.js:15
↓ 29 callers
Method
getLists
(preferLocal = false)
shared/js/background/storage/https.js:44
↓ 28 callers
Method
get
(property)
shared/js/background/classes/company.js:17
↓ 28 callers
Function
routeFromLocalhost
(page, overrideHandler)
integration-test/helpers/testPages.js:18
↓ 27 callers
Method
record
* This will be called for every 'blocked' event. It can be called many times * and in quick succession, hence the debouncing * * @param
shared/js/background/newtab-tracker-stats.js:178
↓ 26 callers
Function
constructMockRemoteConfig
()
unit-test/background/remote-config.js:20
↓ 26 callers
Function
expectState
(expectedSettings, expectedUpdateCallCount)
unit-test/background/declarative-net-request.js:234
↓ 25 callers
Method
getCohortName
* * @param {string} featureName * @param {string} subFeatureName * @returns {string | null}
shared/js/background/components/remote-config.js:148
↓ 25 callers
Function
rulesetEqual
* Generates a declarativeNetRequest ruleset for the given block list and * compares that to an expected ruleset. Optionally also compares the generat
packages/ddg2dnr/test/tds.js:101
↓ 24 callers
Method
delete
(id)
shared/js/background/tab-manager.js:82
↓ 24 callers
Function
updateConfiguration
(configName, etag)
unit-test/background/declarative-net-request.js:143
↓ 22 callers
Function
generateExtensionConfigurationRuleset
* Generated an extension configuration declarativeNetRequest ruleset. * @param {object} extensionConfig * The extension configuration. * @param {
packages/ddg2dnr/lib/extensionConfiguration.js:26
↓ 22 callers
Method
getSetting
(key)
unit-test/background/remote-config.js:12
↓ 21 callers
Method
setLists
(lists)
shared/js/background/https.js:40
↓ 20 callers
Method
_request
* Enqueue a request to the native app and wait for a response, * blocking subsequent callers until the request is complete. * If cacheKey an
shared/js/background/components/cpm-embedded-messaging.js:63
↓ 20 callers
Method
clear
()
shared/js/background/classes/top-blocked.js:20
↓ 20 callers
Method
postMessage
* @param {number} tabId * @param {string} action * @param {any} message
shared/js/background/components/devtools.js:263
↓ 19 callers
Method
logMessage
(message)
shared/js/background/components/cpm-embedded-messaging.js:91
↓ 19 callers
Method
mockRefreshEvent
(tabId, timeStamp = Date.now())
unit-test/background/metrics.js:8
↓ 19 callers
Function
storeInLookup
* Stores the given values in the given lookup for the given key. Takes care to * create the values array for the key if it doesn't already exist. Han
packages/ddg2dnr/lib/utils.js:108
↓ 17 callers
Method
checkInService
* @param {string} host * @returns {Promise<Boolean>}
shared/js/background/https-service.js:71
↓ 17 callers
Function
generateTdsRuleset
* Converts a Tracker Blocking configuration into a declarativeNetRequest * ruleset that blocks/redirects requests to known trackers. * @param {objec
packages/ddg2dnr/lib/tds.js:491
↓ 16 callers
Function
expectPixels
({ startUrl, adClickUrl, heuristicDomain = null, navigations = [], pol
unit-test/background/ad-click-attribution-policy.js:68
↓ 16 callers
Function
overridePrivacyConfig
(networkContext, testConfigFilename)
integration-test/helpers/testConfig.js:9
↓ 16 callers
Method
setList
* This will allowlist any open tabs with the same domain * * @param {object} data * @param {allowlistName} data.list - name of the allo
shared/js/background/tab-manager.js:146
↓ 16 callers
Method
updateSetting
(key, value)
unit-test/background/remote-config.js:15
↓ 15 callers
Function
forExtensionLoaded
(context)
integration-test/helpers/backgroundWait.js:67
↓ 15 callers
Method
get
()
packages/privacy-grade/src/classes/grade.js:177
↓ 15 callers
Method
request
* Send a request to the native app and wait for a response. * * @param {string} method - The method name to call on the native side * @
shared/js/background/components/native-messaging.js:72
↓ 14 callers
Method
canRedirect
(request)
shared/js/background/classes/https-redirects.js:49
↓ 14 callers
Function
getMainFrameRequest
()
unit-test/background/classes/https-redirects.js:26
↓ 14 callers
Method
sendPixel
(pixelName, type, params)
shared/js/background/components/cpm-embedded-messaging.js:141
↓ 13 callers
Function
getFromSessionStorage
(key)
shared/js/background/wrapper.js:248
↓ 13 callers
Function
loadReferenceTestJSONFile
(...pathParts)
packages/ddg2dnr/test/referenceTests.js:22
↓ 13 callers
Method
onMetricTriggered
()
unit-test/background/metrics.js:4
↓ 13 callers
Method
onUpdate
* @param {OnUpdatedCallback} cb
shared/js/background/components/resource-loader.js:207
↓ 13 callers
Method
sort
(sortFunc)
shared/js/background/classes/top-blocked.js:16
↓ 13 callers
Method
syncToStorage
* Persist data into the extensions storage in the following format
shared/js/background/newtab-tracker-stats.js:204
↓ 12 callers
Method
data
* @param {number} [now] - optional timestamp to use as the current time * @return {PlainEntries}
shared/js/background/classes/tracker-stats.js:108
↓ 12 callers
Function
expectAllowlistDenylistState
({ expectedDenylistedDomains, expectedUnprotectedTemporaryDomains, expecte
unit-test/background/declarative-net-request.js:515
↓ 12 callers
Method
firePixel
(eventName)
shared/js/background/components/cookie-prompt-management.js:612
↓ 12 callers
Method
pack
* Every hour, pack up the current entries and start a new pack * @param {number} [now] optional timestamp to use as the current time
shared/js/background/classes/tracker-stats.js:71
↓ 12 callers
Method
registerRedirect
(request)
shared/js/background/classes/https-redirects.js:27
↓ 11 callers
Method
_notify
* Enqueue a notification message to be sent to the native app. * @param {string} method * @param {Record<string, any>} params
shared/js/background/components/cpm-embedded-messaging.js:40
↓ 11 callers
Method
checkAutoconsentEnabledForSite
(url)
shared/js/background/components/cpm-embedded-messaging.js:126
↓ 11 callers
Method
getCohort
* Get the user's assigned cohort for this feature and subfeature * @param {string} featureName * @param {string} subFeatureName * @retu
shared/js/background/components/remote-config.js:138
↓ 11 callers
Method
markExperimentEnrolled
* Mark that the user should be enrolled in the experiment for the given feature and sub feature. * * This will send the enrollment * @p
shared/js/background/components/abn-experiments.js:92
↓ 11 callers
Function
sendPixelRequest
(pixelName, params = {})
shared/js/background/pixels.js:18
↓ 11 callers
Function
setToSessionStorage
(key, data)
shared/js/background/wrapper.js:227
↓ 11 callers
Method
shouldDisplay
* Check if the toggle report UI flow should been displayed display for the * currently focused tab. * * @returns {Promise<boolean>}
shared/js/background/components/toggle-reports.js:170
↓ 10 callers
Method
addRules
* Load the given declarativeNetRequest rules into the test * extension. * @param {object[]} rules * The rules to add.
packages/ddg2dnr/puppeteerInterface.js:66
↓ 10 callers
Method
checkForUpdates
(force)
shared/js/background/components/resource-loader.js:86
↓ 10 callers
Method
checkInCache
* @param {string} host * @returns {Boolean|null}
shared/js/background/https-service.js:55
↓ 10 callers
Method
checkSubfeatureEnabled
(subfeatureName)
shared/js/background/components/cpm-embedded-messaging.js:131
↓ 10 callers
Function
expectUnmodified
(desc)
integration-test/storage-blocking.spec.js:39
↓ 10 callers
Function
toggleUserAllowlistDomain
(domain, enable)
shared/js/background/dnr-user-allowlist.js:62
↓ 9 callers
Function
generateCookieBlockingRuleset
* Build HTTP cookie blocking rules from the blocklist and cookie configuration * @param {import('./utils').TDS} tds The tracker blocklist * @param {
packages/ddg2dnr/lib/cookies.js:12
↓ 9 callers
Function
generateSmarterEncryptionRuleset
* Converts a list of HTTPS enabled domains into a declarativeNetRequest ruleset * that upgrades HTTP requests to HTTPS for those domains. * @param {
packages/ddg2dnr/lib/smarterEncryption.js:52
↓ 9 callers
Function
getMatchDetails
(ruleId)
shared/js/background/dnr-utils.js:106
↓ 9 callers
Method
getOrRestoreTab
(tabId)
shared/js/background/tab-manager.js:117
↓ 9 callers
Method
modify
* Modify resource data in-place * @param {(data: any) => any} func
shared/js/background/components/resource-loader.js:240
↓ 8 callers
Method
addToTrackers
* @param t * @param {string} baseDomain * @param {string} url * @returns {Tracker}
shared/js/background/classes/tab.js:376
↓ 8 callers
Method
canUpgradeUrl
* @param {string} url either domain (example.com) or a full URL (http://example.com/about) * @returns {null|boolean|Promise<boolean>} returns tru
shared/js/background/https.js:81
↓ 8 callers
Function
castDNREnum
* Helper to cast JavaScript strings to the TypeScript enum types expected by * @types/chrome for declarativeNetRequest rules. Does not change the pro
packages/ddg2dnr/lib/utils.js:133
↓ 8 callers
Method
checkAutoconsentSettingEnabled
()
shared/js/background/components/cpm-embedded-messaging.js:121
↓ 8 callers
Method
deserialize
* @param {object} params * @param {number} params.totalCount * @param {Pack} params.current * @param {Pack[]} params.packs
shared/js/background/classes/tracker-stats.js:155
↓ 8 callers
Function
ensureGPCHeaderRule
(config = null)
shared/js/background/dnr-gpc.js:13
↓ 8 callers
Function
getDomain
(url)
packages/privacy-grade/src/utils.js:17
↓ 8 callers
Function
getFireButtonHandle
* @param {*} backgroundPage * @returns {Promise<import('@playwright/test').JSHandle>}
integration-test/fire-button.spec.js:72
↓ 8 callers
Function
makeInitMessage
()
unit-test/background/cookie-prompt-management.js:50
↓ 8 callers
Function
makeSender
({ tabId = 1, frameId = 0, tabUrl = 'https://example.com/page', frameUrl = undefined } = {})
unit-test/background/cookie-prompt-management.js:39
↓ 8 callers
Method
setCohort
* * @param {string} featureName * @param {string} subFeatureName * @param {ChosenCohort | null} cohort
shared/js/background/components/remote-config.js:158
↓ 8 callers
Method
submitBrokenSiteReport
* Only the dashboard sends this message, so we import the types from there. * @param {import('@duckduckgo/privacy-dashboard/schema/__generated__/
shared/js/background/components/dashboard-messaging.js:64
↓ 8 callers
Function
summariseYouTubeRequests
* @param {import('../helpers/requests').LoggedRequestDetails[]} requests
integration-test/click-to-load-youtube.spec.js:16
↓ 7 callers
Function
assertCookieAllowed
(results, testName)
integration-test/storage-blocking.spec.js:93
↓ 7 callers
Function
choseCohort
(cohorts, rng)
shared/js/background/components/remote-config.js:312
↓ 7 callers
Function
constructMockComponents
()
unit-test/background/abn-framework.js:16
↓ 7 callers
Method
delete
* Used for removing the stored tab state. * @param {number} tabId
shared/js/background/classes/tab-state.js:138
↓ 7 callers
Function
getFeatureSettings
(featureName, config = tdsStorage.config)
shared/js/background/utils.js:410
↓ 7 callers
Method
getTrackerData
* @param {string} urlToCheck * @param {string} siteUrl * @param {RequestExpression} request * @param {Set<string>} [supportedCustomRule
packages/privacy-grade/src/classes/trackers.js:316
↓ 7 callers
Function
logPageRequests
(_backgroundPage, page, requests, requestFilter, transform, postTransformFilter)
integration-test/helpers/requests.js:32
next →
1–100 of 952, ranked by callers