MediaWiki:Timeless.js

/* Script originally from Nookipedia, authors listed here: https://nookipedia.com/w/index.php?title=MediaWiki:Nookipedia-timeless.js&action=history */ $(document).ready(function {	/* On desktop, display text logo once user scrolls down */	function toggleTextLogo {		if ($(window).width > 1099) {			if ($(window).scrollTop > 150) {				if ($('#p-logo-text').css('opacity') === '0') {					$('#p-logo-text').css('visibility', 'visible');					$('#p-logo-text').stop.animate({ opacity: 1 }, 250);				}			} else {				if ($('#p-logo-text').css('opacity') === '1') {					$('#p-logo-text').css('visibility', 'hidden');					$('#p-logo-text').stop.animate({ opacity: 0 }, 250);				}			}		} else {			if ($('#p-logo-text').css('opacity') === '0') {				$('#p-logo-text').css('visibility', 'visible');				$('#p-logo-text').stop.animate({ opacity: 1 }, 250);			}		}	}

toggleTextLogo; $(window).scroll(toggleTextLogo); $(window).resize(toggleTextLogo); });