/g, '').replace(/<\/code>/g, '
'));
}
Array.prototype.removeItem = function(item) {
const index = this.indexOf(item);
if (index !== -1) {
this.splice(index, 1);
}
return this;
}
function getCookie(key) {
const split = document.cookie.split(';');
let cookies = {};
split.forEach(elt => {
const val = elt.trim().split('=');
cookies[val[0]] = val[1];
});
if(key !== undefined) {
return cookies[key];
}
return cookies;
}