Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Miroslav Kratochvil
jekyll-theme-lcsb-default
Commits
b00e29e3
Verified
Commit
b00e29e3
authored
Apr 10, 2020
by
Laurent Heirendt
✈
Browse files
fixes for header
parent
bc7e03d0
Changes
1
Hide whitespace changes
Inline
Side-by-side
_includes/css-imports.html
View file @
b00e29e3
...
...
@@ -127,7 +127,6 @@ function loadMatomo() {
_paq
.
push
([
'
setTrackerUrl
'
,
u
+
'
matomo.php
'
]);
_paq
.
push
([
'
setDoNotTrack
'
,
1
]);
_paq
.
push
([
'
trackPageView
'
]);
_paq
.
push
([
'
setSecureCookie
'
,
true
]);
_paq
.
push
([
'
setIgnoreClasses
'
,
[
'
no-tracking
'
,
'
colorbox
'
]]);
_paq
.
push
([
'
enableLinkTracking
'
]);
var
d
=
document
,
g
=
d
.
createElement
(
'
script
'
),
s
=
d
.
getElementsByTagName
(
'
script
'
)[
0
];
...
...
@@ -153,7 +152,7 @@ function clearMatomo() {
for
(
var
i
in
cookies
)
{
var
name
=
cookies
[
i
].
split
(
'
=
'
)[
0
];
if
(
name
.
startsWith
(
'
_pk_
'
))
{
Cookies
.
set
(
name
,
0
,
{
expires
:
-
1
,
path
:
'
/
'
,
SameSite
:
'
None
'
,
Secure
:
true
});
Cookies
.
set
(
name
,
0
,
{
expires
:
-
1
,
path
:
'
/
'
});
}
}
console
.
log
(
'
cleared all cookies
'
);
...
...
@@ -165,7 +164,7 @@ $( document ).ready(function() {
$
(
'
.lap-cookies-accept
'
).
click
(
function
(
e
)
{
e
.
preventDefault
(
true
);
console
.
log
(
'
clicked on accept
'
);
Cookies
.
set
(
'
lap_cookie_agree
'
,
1
,
{
expires
:
parseInt
(
settings
.
expires
),
path
:
'
/
'
,
SameSite
:
'
None
'
,
Secure
:
true
});
Cookies
.
set
(
'
lap_cookie_agree
'
,
1
,
{
expires
:
parseInt
(
settings
.
expires
),
path
:
'
/
'
});
hidelapCookieBanner
();
//jQuery('#lap-cookies-banner').slideUp('slow');
jQuery
(
'
.lap-cookies-accept
'
).
addClass
(
'
disabled
'
);
...
...
@@ -179,7 +178,7 @@ $( document ).ready(function() {
e
.
preventDefault
(
true
);
console
.
log
(
'
clicked on refuse
'
);
clearMatomo
();
Cookies
.
set
(
'
lap_cookie_agree
'
,
0
,
{
expires
:
parseInt
(
settings
.
expires
),
path
:
'
/
'
,
SameSite
:
'
None
'
,
Secure
:
true
});
Cookies
.
set
(
'
lap_cookie_agree
'
,
0
,
{
expires
:
parseInt
(
settings
.
expires
),
path
:
'
/
'
});
hidelapCookieBanner
();
//jQuery('#lap-cookies-banner').slideUp('slow');
jQuery
(
'
.lap-cookies-refuse
'
).
addClass
(
'
disabled
'
);
...
...
@@ -193,22 +192,23 @@ $( document ).ready(function() {
/* Do Not Track is enabled => stop */
jQuery
(
'
.lap-cookies-accept, .lap-cookies-refuse
'
).
addClass
(
'
disabled
'
);
}
}
lapCookieAgree
=
getCookie
(
'
lap_cookie_agree
'
);
}
else
{
lapCookieAgree
=
getCookie
(
'
lap_cookie_agree
'
);
if
(
lapCookieAgree
==
'
0
'
)
{
/* Visitor refused our cookies => remove Matomo trace if present */
jQuery
(
'
.lap-cookies-refuse
'
).
addClass
(
'
disabled
'
);
clearMatomo
();
}
else
if
(
lapCookieAgree
==
'
1
'
)
{
/* Visitor accepted our cookies => load Matomo */
jQuery
(
'
.lap-cookies-accept
'
).
addClass
(
'
disabled
'
);
loadMatomo
();
}
else
{
/* Visitor did not choose yet */
showlapCookieBanner
();
if
(
lapCookieAgree
==
'
0
'
)
{
/* Visitor refused our cookies => remove Matomo trace if present */
jQuery
(
'
.lap-cookies-refuse
'
).
addClass
(
'
disabled
'
);
clearMatomo
();
}
else
if
(
lapCookieAgree
==
'
1
'
)
{
/* Visitor accepted our cookies => load Matomo */
jQuery
(
'
.lap-cookies-accept
'
).
addClass
(
'
disabled
'
);
loadMatomo
();
}
else
{
/* Visitor did not choose yet */
showlapCookieBanner
();
}
}
});
</script>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment