Skip to content

Commit

Permalink
chore: delay cookieconsent appearance until tolgee load complete
Browse files Browse the repository at this point in the history
  • Loading branch information
budak7273 committed Nov 15, 2023
1 parent 053d6e0 commit 3266737
Showing 1 changed file with 23 additions and 21 deletions.
44 changes: 23 additions & 21 deletions src/routes/+layout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -59,28 +59,30 @@
await import('cookieconsent/src/cookieconsent');
if ('cookieconsent' in window) {
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
// cspell:ignore initialise
window.cookieconsent.initialise({
palette: {
popup: {
background: '#000'
tolgee.on('initialLoad', () => {
if ('cookieconsent' in window) {
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
// cspell:ignore initialise
window.cookieconsent.initialise({
palette: {
popup: {
background: '#000'
},
button: {
background: '#f1d600'
}
},
button: {
background: '#f1d600'
}
},
content: {
message: tolgee.t('cookieconsent.message'),
link: tolgee.t('cookieconsent.link'),
dismiss: tolgee.t('cookieconsent.dismiss')
},
theme: 'edgeless',
position: 'bottom-right'
});
}
content: {
message: tolgee.t('cookieconsent.message'),
link: tolgee.t('cookieconsent.link'),
dismiss: tolgee.t('cookieconsent.dismiss')
},
theme: 'edgeless',
position: 'bottom-right'
});
}
});
customProtocolCheck.set(await import('$lib/thirdparty/custom_protocol'));
Expand Down

0 comments on commit 3266737

Please sign in to comment.