2019-10-15 23:42:47 -03:00
|
|
|
$('body').append(`
|
2019-11-07 01:07:31 -03:00
|
|
|
<div data-nosnippet id="tooSmall" class="brownbox center supercenter" style="display: none; width: 80%">
|
2019-10-15 23:42:47 -03:00
|
|
|
<h1>Yikes!</h1>
|
2021-02-03 15:50:19 -03:00
|
|
|
<p>Your <cg>screen</cg> isn't <ca>wide</ca> enough to <cy>display</cy> this <cg>page</cg>.<br>
|
|
|
|
Please <cy>rotate</cy> your <cg>device</cg> <ca>horizontally</ca> or <cy>resize</cy> your <cg>window</cg> to be <ca>longer</ca>.
|
2019-10-15 23:42:47 -03:00
|
|
|
</p>
|
|
|
|
<p style="font-size: 1.8vh">Did I color too many words? I think I colored too many words.</p>
|
|
|
|
</div>
|
|
|
|
`)
|
|
|
|
|
|
|
|
|
|
|
|
$(window).resize(function () {
|
|
|
|
if (window.innerHeight > window.innerWidth - 75) {
|
|
|
|
$('#everything').hide();
|
|
|
|
$('#tooSmall').show();
|
|
|
|
}
|
|
|
|
|
|
|
|
else {
|
|
|
|
$('#everything').show();
|
|
|
|
$('#tooSmall').hide()
|
|
|
|
}
|
2019-10-22 20:54:19 -03:00
|
|
|
});
|
|
|
|
|
|
|
|
function saveUrl() {
|
|
|
|
if (window.location.href.endsWith('?download')) return;
|
|
|
|
sessionStorage.setItem('prevUrl', window.location.href);
|
|
|
|
}
|
2019-10-15 23:42:47 -03:00
|
|
|
|
|
|
|
function backButton() {
|
2019-10-22 20:54:19 -03:00
|
|
|
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()
|
|
|
|
}
|
2019-10-15 23:42:47 -03:00
|
|
|
else window.location.href = "../../../../../"
|
|
|
|
}
|
|
|
|
|
2021-01-18 23:54:18 -03:00
|
|
|
let gdps = null
|
|
|
|
let onePointNine = false
|
|
|
|
|
|
|
|
function Fetch(link) {
|
|
|
|
return new Promise(function (res, rej) {
|
|
|
|
fetch(link).then(resp => {
|
|
|
|
if (!resp.ok) return rej(resp)
|
|
|
|
gdps = resp.headers.get('gdps')
|
|
|
|
if (gdps && gdps.startsWith('1.9/')) { onePointNine = true; gdps = gdps.slice(4) }
|
|
|
|
resp.json().then(res)
|
|
|
|
}).catch(rej)
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
2019-11-17 19:00:19 -03:00
|
|
|
let allowEsc = true;
|
2021-01-18 23:54:18 -03:00
|
|
|
|
2019-10-15 23:42:47 -03:00
|
|
|
$(document).keydown(function(k) {
|
|
|
|
if (k.keyCode == 27) { //esc
|
2019-11-17 19:00:19 -03:00
|
|
|
if (!allowEsc) return
|
2019-10-15 23:42:47 -03:00
|
|
|
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');
|
2019-10-22 20:54:19 -03:00
|
|
|
});
|