$('body').append(`
`) $(window).resize(function () { if (window.innerHeight > window.innerWidth - 75) { $('#everything').hide(); $('#tooSmall').show(); } else { $('#everything').show(); $('#tooSmall').hide() } }); function saveUrl() { if (window.location.href.endsWith('?download')) return; sessionStorage.setItem('prevUrl', window.location.href); } function backButton() { if (window.history.length > 1 && document.referrer.startsWith(window.location.origin)){ if (window.location.href.endsWith('?download') && sessionStorage.getItem('prevUrl') === window.location.href.replace('?download', '')) window.history.go(-2); else window.history.back() } else window.location.href = "../../../../../" } let allowEsc = true; $(document).keydown(function(k) { if (k.keyCode == 27) { //esc if (!allowEsc) return k.preventDefault() if ($('.popup').is(":visible")) $('.popup').hide(); else $('#backButton').trigger('click') } }); while ($(this).scrollTop() != 0) { $(this).scrollTop(0); } $(document).ready(function() { $(window).trigger('resize'); });