Consent on scroll

This commit is contained in:
Amauri CHAMPEAUX 2015-08-31 14:12:15 +02:00
parent c60dbb1e47
commit 5217dbe9c2
1 changed files with 2 additions and 3 deletions

View File

@ -41,7 +41,7 @@ var tarteaucitron = {
window.addEventListener("scroll", function () { window.addEventListener("scroll", function () {
var scrollPos = window.pageYOffset || document.documentElement.scrollTop, var scrollPos = window.pageYOffset || document.documentElement.scrollTop,
heightPosition; heightPosition;
if (document.getElementById('tarteaucitronAlertBig') !== null && tarteaucitron.showsmall && !tarteaucitron.highPrivacy) { if (document.getElementById('tarteaucitronAlertBig') !== null && !tarteaucitron.highPrivacy) {
if (document.getElementById('tarteaucitronAlertBig').style.display === 'block') { if (document.getElementById('tarteaucitronAlertBig').style.display === 'block') {
heightPosition = document.getElementById('tarteaucitronAlertBig').offsetHeight + 'px'; heightPosition = document.getElementById('tarteaucitronAlertBig').offsetHeight + 'px';
@ -95,7 +95,7 @@ var tarteaucitron = {
window.attachEvent("onscroll", function () { window.attachEvent("onscroll", function () {
var scrollPos = window.pageYOffset || document.documentElement.scrollTop, var scrollPos = window.pageYOffset || document.documentElement.scrollTop,
heightPosition; heightPosition;
if (document.getElementById('tarteaucitronAlertBig') !== null && tarteaucitron.showsmall && !tarteaucitron.highPrivacy) { if (document.getElementById('tarteaucitronAlertBig') !== null && !tarteaucitron.highPrivacy) {
if (document.getElementById('tarteaucitronAlertBig').style.display === 'block') { if (document.getElementById('tarteaucitronAlertBig').style.display === 'block') {
heightPosition = document.getElementById('tarteaucitronAlertBig').offsetHeight + 'px'; heightPosition = document.getElementById('tarteaucitronAlertBig').offsetHeight + 'px';
@ -191,7 +191,6 @@ var tarteaucitron = {
} }
// global // global
tarteaucitron.showsmall = defaults.showAlertSmall;
tarteaucitron.orientation = defaults.orientation; tarteaucitron.orientation = defaults.orientation;
tarteaucitron.hashtag = defaults.hashtag; tarteaucitron.hashtag = defaults.hashtag;
tarteaucitron.highPrivacy = defaults.highPrivacy; tarteaucitron.highPrivacy = defaults.highPrivacy;