Neurolingua's picture
Upload 17 files
c17a638 verified
raw
history blame contribute delete
547 Bytes
document.addEventListener('DOMContentLoaded', function() {
var header = document.querySelector('.main-page-header');
var content = document.querySelector('.content');
var observer = new IntersectionObserver(function(entries) {
entries.forEach(function(entry) {
if (!entry.isIntersecting) {
header.style.display = 'none';
} else {
header.style.display = 'block';
}
});
}, { threshold: 0 });
observer.observe(content);
});