A Pen by Artem Bilodid

Thumbnail
This awesome code was written by artbels, you can see more from this user in the personal repository.
You can find the original code on Codepen.io
Copyright artbels ©
  • HTML
  • JavaScript
<!DOCTYPE html>
<html lang="en" >

<head>
  <meta charset="UTF-8">
  <title>A Pen by  Artem Bilodid</title>
  
  
  
  
  
</head>

<body>

  
  
  

    <script  src="js/index.js"></script>




</body>

</html>

/*Downloaded from https://www.codeseek.co/artbels/a-pen-by-artem-bilodid-jLBYmz */
if(/ofis/.test(location.href)) {
  var adr = document.querySelector("h1").innerHTML.trim().split('на ')[1]
  var u = 'https://www.uabiz.net/offers.html?address=' + adr + '&src=multitest'
  document.onmouseleave = function(){
    !localStorage.noSwalUabiz && 
    swal({
      html: true,
      title: "Уже уходите?",
      text: 'Больше вариантов подключения интернета для бизнеса на <a href="' + u + '" target="_blank">UABiz.net</a>',
      confirmButtonText: 'Да, перейти',
      cancelButtonText: 'Нет',
      showCancelButton: true
      
    }, function (r) {
      if(r) location.href = u
      else localStorage.noSwalUabiz = true
    })
  } 
}

Comments