Skip to content

Commit 23d51ca

Browse files
authored
Merge pull request #83441 from aireilly/tweak-footer-js
On page load, hide footer after 3 seconds
2 parents 3c94b66 + 79c72b0 commit 23d51ca

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

_templates/_page_openshift.html.erb

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -794,16 +794,12 @@
794794
<!-- hide footer after 3 seconds -->
795795
<script type="text/javascript">
796796
const hideFooter = () => {
797-
document.querySelector('footer').style.display = "none";
798-
};
799-
800-
window.addEventListener('scroll', function() {
801-
if (window.innerHeight + window.scrollY >= document.body.offsetHeight) {
802-
setTimeout(hideFooter, 3000);
803-
} else {
804-
document.querySelector('footer').style.display = "block";
805-
}
806-
})
797+
document.querySelector('footer#rh').style.display = "none";
798+
};
799+
800+
window.addEventListener('load', function() {
801+
setTimeout(hideFooter, 3000);
802+
});
807803
</script>
808804
</body>
809805
</html>

0 commit comments

Comments
 (0)