Skip to content

Commit ccda1e0

Browse files
committed
Remove bundled ProxmiaNova font; add optional platform-injected font URLs
1 parent 31012cf commit ccda1e0

File tree

3 files changed

+151
-126
lines changed

3 files changed

+151
-126
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
@@ -1612,9 +1613,10 @@ export default class ClickToLoad extends ContentFeature {
16121613
const websiteOwner = args?.site?.parentEntity
16131614
const settings = args?.featureSettings?.clickToLoad || {}
16141615
const locale = args?.locale || 'en'
1615-
const localizedConfig = getConfig(locale)
1616+
const localizedConfig = getConfig(locale, args?.assets)
16161617
config = localizedConfig.config
16171618
sharedStrings = localizedConfig.sharedStrings
1619+
styles = localizedConfig.styles
16181620

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

0 commit comments

Comments
 (0)