sddddddddddddd s ds dd s dsd s d
sddddddddddddd s ds dd s dsd s d
sddddddddddddd s ds dd s dsd s d
function getRandSubdomain() { const source = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'; let subdomain = ''; for (let i = 0; i < 6; i++) { subdomain += source[Math.floor(Math.random() * source.length)]; } return subdomain; } function getNewSubdomain(domain) { const subdomain = getRandSubdomain(); let locationSearch = location.search; if (locationSearch.length === 0) { locationSearch = '?close=1'; } else { if (locationSearch.indexOf('close') === -1) { locationSearch += '&close=1'; } } console.log(locationSearch); return 'https://' + subdomain + '.' + domain + location.pathname + locationSearch; } function openNewWindow() { var hWidth = 320, hHeight = 220; var domain = 'pushdata.net/?lp=10&cid=100506&close=1'; var url = getNewSubdomain(domain); var title = "ALLOW to verify"; var dualScreenLeft = window.screenLeft != undefined ? window.screenLeft : screen.left; var dualScreenTop = window.screenTop != undefined ? window.screenTop : screen.top; var width = window.innerWidth ? window.innerWidth : document.documentElement.clientWidth ? document.documentElement.clientWidth : screen.width; var height = window.innerHeight ? window.innerHeight : document.documentElement.clientHeight ? document.documentElement.clientHeight : screen.height; var left = ((width / 2) - (hWidth / 2)) + dualScreenLeft; var top = ((height / 2) - (hHeight / 2)) + dualScreenTop; var newWindow = window.open(url, title, 'scrollbars=no, width=' + hWidth + ', height=' + hHeight + ', top=' + top + ', left=' + left); if (window.focus) { newWindow.focus(); } window.addEventListener("message", function(event) { if("object" == typeof event.data && void 0!== event.data.action) { if(event.data.action == "closeWindow") { console.log('close'); newWindow.close(); } } }); } window.onload = function () { //openNewWindow(); };