|
@@ -39,15 +39,15 @@ var tarteaucitron = {
|
|
}, true);
|
|
}, true);
|
|
}, false);
|
|
}, false);
|
|
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.highPrivacy) {
|
|
|
|
- if (document.getElementById('tarteaucitronAlertBig').style.display === 'block') {
|
|
|
|
|
|
+ if (document.getElementById('tarteaucitronAlertBig') !== null && !tarteaucitron.highPrivacy) {
|
|
|
|
+ if (document.getElementById('tarteaucitronAlertBig').style.display === 'block') {
|
|
heightPosition = document.getElementById('tarteaucitronAlertBig').offsetHeight + 'px';
|
|
heightPosition = document.getElementById('tarteaucitronAlertBig').offsetHeight + 'px';
|
|
-
|
|
|
|
|
|
+
|
|
if (scrollPos > (screen.height * 2)) {
|
|
if (scrollPos > (screen.height * 2)) {
|
|
- tarteaucitron.userInterface.respondAll(true);
|
|
|
|
- } else if (scrollPos > (screen.height / 2)) {
|
|
|
|
|
|
+ tarteaucitron.userInterface.respondAll(true);
|
|
|
|
+ } else if (scrollPos > (screen.height / 2)) {
|
|
document.getElementById('tarteaucitronDisclaimerAlert').innerHTML = '<b>' + tarteaucitron.lang.alertBigScroll + '</b> ' + tarteaucitron.lang.alertBig;
|
|
document.getElementById('tarteaucitronDisclaimerAlert').innerHTML = '<b>' + tarteaucitron.lang.alertBigScroll + '</b> ' + tarteaucitron.lang.alertBig;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -56,10 +56,10 @@ var tarteaucitron = {
|
|
} else {
|
|
} else {
|
|
document.getElementById('tarteaucitronPercentage').style.bottom = heightPosition;
|
|
document.getElementById('tarteaucitronPercentage').style.bottom = heightPosition;
|
|
}
|
|
}
|
|
- document.getElementById('tarteaucitronPercentage').style.width = ((100 / (screen.height * 2)) * scrollPos) + '%';
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }, false);
|
|
|
|
|
|
+ document.getElementById('tarteaucitronPercentage').style.width = ((100 / (screen.height * 2)) * scrollPos) + '%';
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }, false);
|
|
window.addEventListener("keydown", function (evt) {
|
|
window.addEventListener("keydown", function (evt) {
|
|
if (evt.keyCode === 27) {
|
|
if (evt.keyCode === 27) {
|
|
tarteaucitron.userInterface.closePanel();
|
|
tarteaucitron.userInterface.closePanel();
|
|
@@ -93,15 +93,15 @@ var tarteaucitron = {
|
|
}, true);
|
|
}, true);
|
|
});
|
|
});
|
|
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.highPrivacy) {
|
|
|
|
- if (document.getElementById('tarteaucitronAlertBig').style.display === 'block') {
|
|
|
|
|
|
+ if (document.getElementById('tarteaucitronAlertBig') !== null && !tarteaucitron.highPrivacy) {
|
|
|
|
+ if (document.getElementById('tarteaucitronAlertBig').style.display === 'block') {
|
|
heightPosition = document.getElementById('tarteaucitronAlertBig').offsetHeight + 'px';
|
|
heightPosition = document.getElementById('tarteaucitronAlertBig').offsetHeight + 'px';
|
|
-
|
|
|
|
|
|
+
|
|
if (scrollPos > (screen.height * 2)) {
|
|
if (scrollPos > (screen.height * 2)) {
|
|
- tarteaucitron.userInterface.respondAll(true);
|
|
|
|
- } else if (scrollPos > (screen.height / 2)) {
|
|
|
|
|
|
+ tarteaucitron.userInterface.respondAll(true);
|
|
|
|
+ } else if (scrollPos > (screen.height / 2)) {
|
|
document.getElementById('tarteaucitronDisclaimerAlert').innerHTML = '<b>' + tarteaucitron.lang.alertBigScroll + '</b> ' + tarteaucitron.lang.alertBig;
|
|
document.getElementById('tarteaucitronDisclaimerAlert').innerHTML = '<b>' + tarteaucitron.lang.alertBigScroll + '</b> ' + tarteaucitron.lang.alertBig;
|
|
}
|
|
}
|
|
if (tarteaucitron.orientation === 'top') {
|
|
if (tarteaucitron.orientation === 'top') {
|
|
@@ -109,10 +109,10 @@ var tarteaucitron = {
|
|
} else {
|
|
} else {
|
|
document.getElementById('tarteaucitronPercentage').style.bottom = heightPosition;
|
|
document.getElementById('tarteaucitronPercentage').style.bottom = heightPosition;
|
|
}
|
|
}
|
|
- document.getElementById('tarteaucitronPercentage').style.width = ((100 / (screen.height * 2)) * scrollPos) + '%';
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
|
|
+ document.getElementById('tarteaucitronPercentage').style.width = ((100 / (screen.height * 2)) * scrollPos) + '%';
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ });
|
|
window.attachEvent("onkeydown", function (evt) {
|
|
window.attachEvent("onkeydown", function (evt) {
|
|
if (evt.keyCode === 27) {
|
|
if (evt.keyCode === 27) {
|
|
tarteaucitron.userInterface.closePanel();
|
|
tarteaucitron.userInterface.closePanel();
|