mirror of
https://github.com/microsoft/graphrag.git
synced 2025-12-26 14:38:52 +00:00
Fix cookie consent script missing (#1292)
This commit is contained in:
parent
ce5b1207e0
commit
fc502ee029
18
docs/scripts/create_cookie_banner.js
Normal file
18
docs/scripts/create_cookie_banner.js
Normal file
@ -0,0 +1,18 @@
|
||||
function onConsentChanged(categoryPreferences) {
|
||||
console.log("onConsentChanged", categoryPreferences);
|
||||
}
|
||||
|
||||
|
||||
cb = document.createElement("div");
|
||||
cb.id = "cookie-banner";
|
||||
document.body.insertBefore(cb, document.body.children[0]);
|
||||
|
||||
window.WcpConsent && WcpConsent.init("en-US", "cookie-banner", function (err, consent) {
|
||||
if (!err) {
|
||||
console.log("consent: ", consent);
|
||||
window.manageConsent = () => consent.manageConsent();
|
||||
siteConsent = consent;
|
||||
} else {
|
||||
console.log("Error initializing WcpConsent: "+ err);
|
||||
}
|
||||
}, onConsentChanged, WcpConsent.themes.light);
|
||||
Loading…
x
Reference in New Issue
Block a user