Gitlab is now using https://gitlab.lcsb.uni.lu as it's primary address. Please update your bookmarks. FAQ.

Verified Commit 9b02ef9e authored by Laurent Heirendt's avatar Laurent Heirendt
Browse files

remove assets

parent 88784edb
<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 74.49 61.04"><title>r3-logo</title><path d="M6.36,5.4H24.93c2.67,0,8.14,0,12,2.45a12.21,12.21,0,0,1,5.76,10.59A12.6,12.6,0,0,1,32.86,31c5,1.29,7.2,3.53,7.92,10C41.5,47.17,42,51.63,44,57.39H36.31c-1.15-3.45-1.87-9.79-2.37-13.75-.87-7.56-2.67-9.72-11.38-9.72H13.49V57.39H6.36Zm7,22.4H24.72c.79,0,4.9,0,6.84-1.15a7.39,7.39,0,0,0,3.53-6.77c0-8.43-7.49-8.43-10.37-8.43H13.34Z" style="fill:#00aae5"/><path d="M54.23,26.89c0,2.69,1.77,4.6,5.33,4.6,4.08,0,5.8-2.52,5.8-5a4.91,4.91,0,0,0-4.2-5,16.64,16.64,0,0,0-4-.21V18c2.9.25,7.77-.32,7.77-4.88,0-3.18-2.23-4.44-5.13-4.44-2.18,0-4.91.94-5.29,4.44H50.24c.26-7,7.06-7.7,9.41-7.7,6.34,0,9.48,3.71,9.48,7.62,0,2.32-1.3,5.66-5.79,6.63a6.67,6.67,0,0,1,6.21,6.84c0,3.95-3.31,8.31-10.07,8.31-3.06,0-6.13-.86-8-2.93a7.3,7.3,0,0,1-1.72-5Z" style="fill:#ee2e27"/></svg>
\ No newline at end of file
var _paq = window._paq || _paq || [];
// convert days to milliseconds
settings.cookieTimeout = settings.expires * 86400 * 1000;
/*
* loadMatomo: load the tracking code of the analytics instance
*/
function loadMatomo() {
if (settings.siteID > 0) {
var u = settings.matomoURL;
_paq.push(['setSiteId', settings.siteID]);
_paq.push(['setTrackerUrl', u + 'matomo.php']);
_paq.push(['setDoNotTrack', 1]);
_paq.push(['trackPageView']);
_paq.push(['setIgnoreClasses', ['no-tracking', 'colorbox']]);
_paq.push(['enableLinkTracking']);
// set the cookie domain an
if(!(settings.cookieDomain == "*")) {
_paq.push(["setCookieDomain", settings.cookieDomain]);
}
var d = document,
g = d.createElement('script'),
s = d.getElementsByTagName('script')[0];
g.type = 'text/javascript';
g.defer = true;
g.async = true;
g.src = u + 'matomo.js';
s.parentNode.insertBefore(g, s);
setResultText(true);
}
}
/*
* setResultText: change the text in the footer
*/
function setResultText(acceptCookies) {
if (acceptCookies === true) {
$('#gdpr-result-text').html(settings.accept_all_text);
} else {
$('#gdpr-result-text').html(settings.only_necessary_text);
}
}
/*
* showBanner: show the banner
*/
function showBanner() {
var popup = $('#lap-cookies-banner');
popup.hide();
popup.slideDown('slow');
}
/*
* hideBanner: show the banner
*/
function hideBanner() {
var popup = $('#lap-cookies-banner');
setTimeout(() => { popup.slideUp('slow'); }, settings.timeout_hidebanner);
}
/*
* clearCookies: clear all cookies
*/
function clearCookies() {
var originOfTime = new Date(0);
var hostname = document.location.hostname.replace(/^www\./, ''),
commonSuffix = '; expires= ' + originOfTime + '; path=/';
// remove the analytics cookies
var cookies = document.cookie.split('; ');
for (var i in cookies) {
var name = cookies[i].split('=')[0];
if (name.startsWith('_pk_') || name.startsWith('MATOMO_SESSID')) {
document.cookie = name + '=; ' + commonSuffix;
}
}
setResultText(false);
}
/*
* setCookie: create/update cookie
*/
function setCookie(name, value) {
var date = new Date();
date.setTime(date.getTime() + settings.cookieTimeout);
document.cookie = name + '=' + value + ';expires=' + date.toGMTString() + ';path=/';
}
function isCookieSetTo(val) {
return document.cookie.indexOf(settings.cookieName + '=' + val) > -1;
}
/*
* hasConsent: check if user gave consent
*/
function hasConsent() {
if (isCookieSetTo(1)) {
setResultText(true);
return true;
} else if (isCookieSetTo(0)) {
setResultText(false);
return false;
}
return null;
}
/*
* accept: accept the cookies
*/
function accept() {
// action
loadMatomo();
// cookie management
setCookie(settings.cookieName, 1);
// feedback
setResultText(true);
// style
$('.lap-accept').addClass('selected');
$('.lap-refuse').removeClass('selected');
// hide banner
hideBanner();
}
/*
* accept: refuse the cookies
*/
function refuse(doNotTrack) {
// action
clearCookies();
// cookie management
// only set the refusal cookie if actually allowed (i.e. doNotTrack = false)
if (doNotTrack === false) {
setCookie(settings.cookieName, 0);
}
// feedback
setResultText(false);
// style
$('.lap-refuse').addClass('selected');
$('.lap-accept').removeClass('selected');
// hide banner
hideBanner();
}
/*
* main function
*/
$(document).ready(function() {
// accept
$('.lap-accept').click(function(e) {
e.preventDefault(true);
accept();
});
// refuse
$('.lap-refuse').click(function(e) {
e.preventDefault(true);
refuse(false);
});
// detect if the visitor is a bot or not
// prevent search engine t otake the cookie alert message as main content
var isBot = settings.bots.test(navigator.userAgent);
// check if DoNotTrack is active
var dnt = navigator.doNotTrack || navigator.msDoNotTrack || window.doNotTrack;
var isToTrack = (dnt !== null && dnt !== undefined) ? (dnt && dnt !== 'yes' && dnt !== 1 && dnt !== '1') : true;
var doNotTrack = false;
// do nothing if it is a bot or if DoNotTrack is active
if (isBot || !isToTrack || hasConsent() === false) {
doNotTrack = true;
refuse(doNotTrack);
}
if (doNotTrack === false) {
if (hasConsent() === true) {
// user has already given consent to use cookies to tracking
accept();
} else if (hasConsent() === false || hasConsent() === null) {
// all other cases considered, show banner
showBanner();
}
}
});
\ No newline at end of file
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment