element.value = domain[0] + '\n';
function parseUrl(e) {
let domains = element.value.split('\n');
const re = /(?:[\w-]+\..)+[\w-]+/g;
for (let i = 0, ln = domains.length; i < ln; ++i) {
const domain = re.exec(domains[i]);
element.value += domain[0] + '\n';
console.log(domain[0]);
}
}
$(document).on('click', '.block-btn', function(e) {
e.preventDefault();
var id = $(this).attr('id');
var block = $('div[data-block-visible="' + id + '"]');
block.toggleClass('active');
});
$(document).on('click', '.custom-close', function(e) {
e.preventDefault();
var id = $(this).attr('data-block-visibled');
var block = $('div[data-block-visible="' + id + '"]');
block.removeClass('active');
});