The story is this: I have 2 sites, one on Ucoz, the second on DLE. The first was yukoz, not bad has grown 1.5 years. But yukoz sucks, made a site on DLE and I do not want to fool much with the promotion and I think ucoz to do such a thing.

If the user went to the site, he does nothing and closes the tab, then nothing happens. But if the user clicked on any point of the site (generally any) even where there is no link, then he opens my site on DLE in a new tab, but he must remain on the ucoz site. And after he opened the site, it no longer opens. In a cookie trip like ...

I think everything is correctly and clearly expressed))

PS: I saw this on some site ...

  • 7
    > I have 2 sites, one on Ucoz, the second on DLE. I did not read further :( - Deonis

1 answer 1

I saw this on some site ...

On any site with advertising in pop-ups.

var DLE = false; document.body.onClick = function(){ if(!DLE){ window.open('_URL_'); DLE = true; } }; 
  • five
    And precisely because of those who wrote this script, I hate the Internet. - Shevsky