function evalScripts(el) {
var $scripts = el.querySelectorAll('script');
for (var i = 0; i < $scripts.length; i++) {
var $script = $scripts[i];
var s = document.createElement('script');
s.type = 'text/javascript';
if ($script.src) {
s.src = $script.src;
} else {
s.textContent = $script.innerText;
}
el.appendChild(s); // можно вставить в head
}
};
class Cookie {
constructor() {
}
static get ORDER_TYPE() {
return 'order';
}
currentCookie() {
if ($.cookie(Cookie.ORDER_TYPE) && $.cookie(Cookie.ORDER_TYPE) !== "") {
return JSON.parse($.cookie(Cookie.ORDER_TYPE));
} else {
return this.setCookie({});
}
};
}