✨ feat(app.js): Ajoute le chatwoot SDK avec insertion de script dynamique.
🎨 style(ViteAssetExtension.php): Modifie le media du preload css en 'screen'.
This commit is contained in:
@@ -429,26 +429,18 @@ document.addEventListener('DOMContentLoaded', ()=>{
|
||||
// Gère le bandeau de cookies (bottom-right)
|
||||
handleCookieBanner()
|
||||
|
||||
(function(d, t) {
|
||||
var BASE_URL = "https://app.chatwoot.com";
|
||||
var g = d.createElement(t),
|
||||
s = d.getElementsByTagName(t)[0];
|
||||
var BASE_URL_WOOT = "https://app.chatwoot.com";
|
||||
let script =document.createElement('script');
|
||||
script.setAttribute('src',BASE_URL_WOOT + "/packs/js/sdk.js")
|
||||
script.setAttribute('sync',true)
|
||||
document.head.append(script)
|
||||
script.onload = function() {
|
||||
window.chatwootSDK.run({
|
||||
websiteToken: '8SXvcdoWJVA77hug4mT5JhAP',
|
||||
baseUrl: BASE_URL_WOOT
|
||||
})
|
||||
}
|
||||
|
||||
// Set the script source and make it async
|
||||
g.src = BASE_URL + "/packs/js/sdk.js";
|
||||
g.async = true;
|
||||
|
||||
// Insert the script element before the first existing script tag
|
||||
s.parentNode.insertBefore(g, s);
|
||||
|
||||
// Initialize Chatwoot once the SDK script has loaded
|
||||
g.onload = function() {
|
||||
window.chatwootSDK.run({
|
||||
websiteToken: '8SXvcdoWJVA77hug4mT5JhAP',
|
||||
baseUrl: BASE_URL
|
||||
})
|
||||
}
|
||||
})(document, "script");
|
||||
Sentry.init({
|
||||
dsn: "https://129785624e32fc0d4d7d8002a03b77b7@o4509563601092608.ingest.de.sentry.io/4510392640340048",
|
||||
// Setting this option to true will send default PII data to Sentry.
|
||||
|
||||
Reference in New Issue
Block a user