const params = 'width=240,height=320,menubar=no,location=no,resizable=no,scrollbars=yes,status=yes';
const getCookie = (key) => {
const v = document.cookie.match(`(^|;) ?${key}=([^;]*)(;|$)`);
return v ? v[2] : null
};
const setCookie = (key, value, days) => {
const d = new Date();
d.setTime(d.getTime() + 24 * 60 * 60 * 1000 * days)
document.cookie = `${key}=${value};path=/;expires=${d.toGMTString()}`
};
const openWindow = () => {
const { cookieEnabled } = navigator;
if (cookieEnabled) {
const cookies = getCookie('clickunder');
if (cookies == null) {
setCookie('clickunder', true, '1')
window.open('http://goload.ru/', 'Goload', params)
window.focus()
}
}
};
document.onmouseup = openWindow;