Skip to content

Commit 3b833c7

Browse files
committed
Remove bundled ProxmiaNova font; add optional platform-injected font URLs
1 parent db8015b commit 3b833c7

File tree

3 files changed

+140
-115
lines changed

3 files changed

+140
-115
lines changed

src/features/click-to-load.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { createCustomEvent, sendMessage, originalWindowDispatchEvent } from '../utils.js'
22
import { logoImg, loadingImages, closeIcon } from './click-to-load/ctl-assets.js'
3-
import { styles, getConfig } from './click-to-load/ctl-config.js'
3+
import { getStyles, getConfig } from './click-to-load/ctl-config.js'
44
import ContentFeature from '../content-feature.js'
55

66
/**
@@ -22,6 +22,7 @@ const titleID = 'DuckDuckGoPrivacyEssentialsCTLElementTitle'
2222
// @see {getConfig}
2323
let config = null
2424
let sharedStrings = null
25+
let styles = null
2526

2627
// TODO: Remove these redundant data structures and refactor the related code.
2728
// There should be no need to have the entity configuration stored in two
@@ -1617,9 +1618,10 @@ export default class ClickToLoad extends ContentFeature {
16171618
const websiteOwner = args?.site?.parentEntity
16181619
const settings = args?.featureSettings?.clickToLoad || {}
16191620
const locale = args?.locale || 'en'
1620-
const localizedConfig = getConfig(locale)
1621+
const localizedConfig = getConfig(locale, args?.assets)
16211622
config = localizedConfig.config
16221623
sharedStrings = localizedConfig.sharedStrings
1624+
styles = localizedConfig.styles
16231625

16241626
for (const entity of Object.keys(config)) {
16251627
// Strip config entities that are first-party, or aren't enabled in the

0 commit comments

Comments
 (0)