Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Miroslav Kratochvil
jekyll-theme-lcsb-default
Commits
ac136556
Verified
Commit
ac136556
authored
Apr 16, 2020
by
Laurent Heirendt
✈
Browse files
fix issue with FF
parent
d92f021b
Changes
1
Hide whitespace changes
Inline
Side-by-side
assets/js/gdpr.js
View file @
ac136556
...
...
@@ -85,28 +85,30 @@ $( document ).ready(function() {
});
/* default mechanism */
dnt
=
false
;
if
(
window
.
doNotTrack
||
navigator
.
doNotTrack
||
navigator
.
msDoNotTrack
||
(
'
external
'
in
window
&&
'
msTrackingProtectionEnabled
'
in
window
.
external
))
{
if
(
window
.
doNotTrack
==
"
1
"
||
navigator
.
doNotTrack
==
"
yes
"
||
navigator
.
doNotTrack
==
"
1
"
||
navigator
.
msDoNotTrack
==
"
1
"
||
(
'
external
'
in
window
&&
'
msTrackingPronectionEnabled
'
in
window
.
external
&&
window
.
external
.
msTrackingProtectionEnabled
()))
{
/* Do Not Track is enabled => stop */
jQuery
(
'
.lap-cookies-accept, .lap-cookies-refuse
'
).
addClass
(
'
disabled
'
);
/* Do Not Track is enabled => stop */
jQuery
(
'
.lap-cookies-accept, .lap-cookies-refuse
'
).
addClass
(
'
disabled
'
);
dnt
=
true
;
}
}
else
{
}
if
(
dnt
==
false
)
{
// get the indicator cookie
var
lapCookieAgree
=
''
;
var
name
=
'
lap_cookie_agree=
'
;
var
cookieArray
=
decodeURIComponent
(
document
.
cookie
).
split
(
'
;
'
);
cookieArray
.
forEach
(
cookie
=>
{
if
(
cookie
.
indexOf
(
name
)
==
0
)
{
lapCookieAgree
=
parseInt
(
cookie
.
substring
(
name
.
length
,
cookie
.
length
)
)
;
lapCookieAgree
=
cookie
.
substring
(
name
.
length
,
cookie
.
length
);
}
});
// logic
if
(
lapCookieAgree
==
0
)
{
if
(
lapCookieAgree
==
'
0
'
)
{
/* visitor refused cookies => remove Matomo trace if present */
jQuery
(
'
.lap-cookies-refuse
'
).
addClass
(
'
disabled
'
);
clearCookies
();
}
else
if
(
lapCookieAgree
==
1
)
{
}
else
if
(
lapCookieAgree
==
'
1
'
)
{
/* visitor accepted cookies => load Matomo */
jQuery
(
'
.lap-cookies-accept
'
).
addClass
(
'
disabled
'
);
loadMatomo
();
...
...
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