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({});
}
};
} function getCount(str, i, counter = 0) {
if (i >= str.length) return counter;
if (['a', 'e', 'i', 'o', 'u'].indexOf(str[i]) != -1) {
return getCount(str, ++i, ++counter)
}
return getCount(str, ++i, counter);
}