forked from microsoft/language-server-protocol
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpage.js
32 lines (26 loc) · 950 Bytes
/
page.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
$('#small-nav-dropdown').change(function() {
window.location = $(this)
.find('option:selected')
.val()
})
function onConsentChanged() {
console.log(WcpConsent.siteConsent.getConsent());
// Where we would handle non-essential cookies in the future
}
$(function() {
// Load GA upfront because we classify it as essential cookie
window.dataLayer = window.dataLayer || []
function gtag() {
dataLayer.push(arguments)
}
gtag('js', new Date())
gtag('config', 'UA-62780441-30', { anonymize_ip: true })
window.WcpConsent && WcpConsent.init("en-US", "cookie-banner", function (err, _siteConsent) {
}, onConsentChanged, WcpConsent.themes.light);
const cookieManager = document.querySelector('#footer-cookie-link');
if (WcpConsent.siteConsent.isConsentRequired && cookieManager && cookieManager.parentElement) {
cookieManager.parentElement.style.display = '';
}
// initialize consent
onConsentChanged();
})