💾 Archived View for she12.midnight.pub › randomizeLogo captured on 2023-01-29 at 02:34:08. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2021-11-30)

-=-=-=-=-=-=-

/*

</style>

<script type="text/javascript" src="https://she12.midnight.pub/logos"></script>

<script type="text/javascript">

function randomizeLogo() {

const logoContainer = document.getElementsByTagName('pre')[0];

const preferredLogo = null;

let firstSignSet = false;

let firstSign = 0;

let lastSign = 0;

for (const logoKey in logos) {

lastSign = logoKey;

if (!firstSignSet) { firstSign = logoKey; firstSignSet = true; }

}

function getRandomSignKey() {

const min = Math.ceil(firstSign);

const max = Math.floor(lastSign);

return Math.floor(Math.random() * (max - min + 1) + min);

}

const setLogo = (logoKey) => logoContainer.innerHTML = logos[logoKey];

currentSignKey = typeof preferredLogo == 'number' ? preferredLogo : getRandomSignKey();

setLogo(currentSignKey);

logoContainer.onclick = function() {

currentSignKey++;

if (currentSignKey > lastSign) { currentSignKey -= (lastSign - firstSign + 1); }

setLogo(currentSignKey);

};

}

if (window.location == "https://midnight.pub/") { window.onload = randomizeLogo; }

/*

</script>

<style type="text/css">

@media only screen and (max-width: 900px) { pre { overflow-x: scroll; } }