1
1
import { createCustomEvent , sendMessage , originalWindowDispatchEvent } from '../utils.js'
2
2
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'
4
4
import ContentFeature from '../content-feature.js'
5
5
6
6
/**
@@ -22,6 +22,7 @@ const titleID = 'DuckDuckGoPrivacyEssentialsCTLElementTitle'
22
22
// @see {getConfig}
23
23
let config = null
24
24
let sharedStrings = null
25
+ let styles = null
25
26
26
27
// TODO: Remove these redundant data structures and refactor the related code.
27
28
// There should be no need to have the entity configuration stored in two
@@ -1612,9 +1613,10 @@ export default class ClickToLoad extends ContentFeature {
1612
1613
const websiteOwner = args ?. site ?. parentEntity
1613
1614
const settings = args ?. featureSettings ?. clickToLoad || { }
1614
1615
const locale = args ?. locale || 'en'
1615
- const localizedConfig = getConfig ( locale )
1616
+ const localizedConfig = getConfig ( locale , args ?. assets )
1616
1617
config = localizedConfig . config
1617
1618
sharedStrings = localizedConfig . sharedStrings
1619
+ styles = localizedConfig . styles
1618
1620
1619
1621
for ( const entity of Object . keys ( config ) ) {
1620
1622
// Strip config entities that are first-party, or aren't enabled in the
0 commit comments