mirror of
https://github.com/LukeSmithxyz/based.cooking.git
synced 2025-03-30 06:28:34 +01:00
17 lines
443 B
HTML
17 lines
443 B
HTML
</ul>
|
|
<script>
|
|
var entries = document.getElementsByClassName('entrylink');
|
|
var randlink = document.getElementById('rand');
|
|
randlink.style.display = 'revert';
|
|
function setbutton() {
|
|
let rand = entries[Math.floor(Math.random() * entries.length)];
|
|
randlink.innerHTML = 'Random: ' + rand.innerHTML + '<br>';
|
|
randlink.href = rand.href;
|
|
}
|
|
setbutton();
|
|
randlink.onmouseup = function(e){
|
|
if (e.which != 1)
|
|
setTimeout(setbutton, 10);
|
|
}
|
|
</script>
|