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
@@ -1617,9 +1618,10 @@ export default class ClickToLoad extends ContentFeature {
1617
1618
const websiteOwner = args ?. site ?. parentEntity
1618
1619
const settings = args ?. featureSettings ?. clickToLoad || { }
1619
1620
const locale = args ?. locale || 'en'
1620
- const localizedConfig = getConfig ( locale )
1621
+ const localizedConfig = getConfig ( locale , args ?. assets )
1621
1622
config = localizedConfig . config
1622
1623
sharedStrings = localizedConfig . sharedStrings
1624
+ styles = localizedConfig . styles
1623
1625
1624
1626
for ( const entity of Object . keys ( config ) ) {
1625
1627
// Strip config entities that are first-party, or aren't enabled in the
0 commit comments