MediaWiki:Common.js: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
No edit summary
Line 743: Line 743:
         // Hide the download button if it's a subpage
         // Hide the download button if it's a subpage
         $('a[href*="/find_epub.php"]').hide();
         $('a[href*="/find_epub.php"]').hide();
    }
});
document.addEventListener('scroll', function() {
    var specialChars = document.getElementById('editpage-specialchars');
    var scrollTop = window.pageYOffset || document.documentElement.scrollTop;
    var elementOffsetTop = specialChars.offsetTop;
    if (scrollTop >= elementOffsetTop) {
        specialChars.classList.add('sticky-sidebar');
    } else {
        specialChars.classList.remove('sticky-sidebar');
     }
     }
});
});

Navigation menu