Thu Nov 14 2019
Copied to clipboard! Copy reply
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107
  • 108
console.log('--- EU ---')

// If user has accepted, exit.
if (/privacy-policy-november/ig.test(document.cookie)) {
  return
}

var text = ''
var buttonText = ''
var host = window.location.host
var link = ''


  
switch (host) {
  case 'www.rosettastone.ca':
  case 'www.rosettastone.com':
  case 'www.therosettastone.com.au':
  case 'www.rosettastone.cn':    
  case 'www.rosettastone.co.kr': 
      link = 'https://resources.rosettastone.com/CDN/us/agreements/website-privacy-policy-us.pdf'
      text = "Because your privacy is important to us, we inform you that we have updated our <a href='"+link+"' target='_blank'>Website Privacy Policy</a>.<br>You can find the new Privacy Policy  <a href='"+link+"' target='_blank'>here</a>."
      buttonText = 'close and continue'
      break;

  case 'espanol.rosettastone.com':
      link = 'https://resources.rosettastone.com/CDN/us/agreements/website-privacy-policy-us.pdf'
      text = 'Debido a que su privacidad es importante para nosotros, le informamos que hemos actualizado nuestra <a href="'+link+'" target="_blank">Política de Privacidad del Sitio Web</a>. Puede encontrar la nueva Política de Privacidad <a href="'+link+'" target="_blank">aquí</a>'
      buttonText = 'cerrar y continuar'
      break;

  case 'www.rosettastone.co.uk':
      link = 'https://resources.rosettastone.com/CDN/uk/pdfs/website-privacy-policy-uk.pdf'
      text = "Because your privacy is important to us, we inform you that we have updated our <a href='"+link+"' target='_blank'>Website Privacy Policy</a>.<br>You can find the new Privacy Policy  <a href='"+link+"' target='_blank'>here</a>."
      buttonText = 'close and continue'
    break;

  case 'www.rosettastone.de':
    link = "https://resources.rosettastone.com/CDN/de/pdfs/website-privacy-policy-de.pdf"
    text = "Da uns der Schutz Ihrer Privatsphäre wichtig ist, informieren wir Sie darüber, dass wir unsere <a href='"+link+"' target='_blank'>Datenschutzerklärung für die Website </a>aktualisiert haben. Die neue Datenschutzerklärung finden Sie <a href='"+link+"' target='_blank'>hier</a> ."
    buttonText = "schließen und fortsetzen"
    break;

  case 'www.rosettastonebrasil.com':
    link = 'https://resources.rosettastone.com/CDN/br/pdfs/website-privacy-policy-br.pdf'
    text = 'Como sua privacidade é importante para nós, informamos que atualizamos nossa <a href="'+link+'" target="_blank">Política de Privacidade do Site</a> . Você pode encontrar a nova Política de Privacidade <a href="'+link+'" target="_blank">aqui</a>.'
    buttonText = 'fechar e continuar'
    break;
  
  case 'www.rosettastone.fr':
    link = 'https://resources.rosettastone.com/CDN/uk/pdfs/website-privacy-policy-uk.pdf'
    text = 'Parce que le respect de votre vie privée est important pour nous, nous vous informons que nous avons mis à jour notre <a href="'+link+'" target="_blank">politique de confidentialité du site Web</a>. Vous pouvez trouver la nouvelle politique de confidentialité <a href="'+link+'" target="_blank">ici</a>'
    buttonText = 'fermer et continuer'
    break;

  case 'www.rosettastone.es':  
    link = 'https://resources.rosettastone.com/CDN/uk/pdfs/website-privacy-policy-uk.pdf'
    text = 'Debido a que su privacidad es importante para nosotros, le informamos que hemos actualizado nuestra <a href="'+link+'" target="_blank">Política de Privacidad del Sitio Web</a>. Puede encontrar la nueva Política de Privacidad <a href="'+link+'" target="_blank">aquí</a>'
    buttonText = 'cerrar y continuar'
    break;

  case 'www.rosettastone.it':
    link = 'https://resources.rosettastone.com/CDN/uk/pdfs/website-privacy-policy-uk.pdf'
    text = "Poiché la vostra privacy è importante per noi, vi informiamo che abbiamo aggiornato la nostra politica sulla <a href='"+link+"' target='_blank'>privacy del sito web</a>. Potete trovare la nuova informativa sulla privacy <a href='"+link+"' target='_blank'>qui</a>"
    buttonText = "chiudere e continuare"
    break;

  case 'www.rosettastone.eu':  
    link = 'https://resources.rosettastone.com/CDN/uk/pdfs/website-privacy-policy-uk.pdf'
    text = "Because your privacy is important to us, we inform you that we have updated our <a href='"+link+"' target='_blank'>Website Privacy Policy</a>.<br>You can find the new Privacy Policy  <a href='"+link+"' target='_blank'>here</a>."
    buttonText = 'close and continue'
    break;

  default:
    link = 'https://resources.rosettastone.com/CDN/us/agreements/website-privacy-policy-us.pdf'
    text = "Because your privacy is important to us, we inform you that we have updated our <a href='"+link+"' target='_blank'>Website Privacy Policy</a>.<br>You can find the new Privacy Policy  <a href='"+link+"' target='_blank'>here</a>."
    buttonText = 'close and continue'
    break;
  
}

document.querySelector('.policy-text').innerHTML = text
document.querySelector('.close-continue').innerHTML = buttonText
document.querySelector('#policy-banner').style.display = 'block'

document.querySelector('#policy-banner > a.close').addEventListener('click', function (e) {
  e.preventDefault()
  setCookie('privacy-policy-november-2019', 'seen', 95)
  document.querySelector('#policy-banner').style.display = 'none'
})
document.querySelector('.close-continue').addEventListener('click', function (e) {
  e.preventDefault()
  setCookie('privacy-policy-november-2019', 'accepted', 95)
  document.querySelector('#policy-banner').style.display = 'none'
})

function setCookie(name, value, days) {
    var date, expires;
    if (days) {
        date = new Date();
        date.setTime(date.getTime()+(days*24*60*60*1000));
        expires = "; expires="+date.toGMTString();
    } else {
        expires = "";
    }
    document.cookie = name+"="+value+expires+"; path=/";
  console.log('cookie set')
}