mirror of
https://gitlab.com/skysthelimit.dev/selenite.git
synced 2025-06-15 18:12:08 -05:00
10 lines
428 B
JavaScript
10 lines
428 B
JavaScript
$.getJSON("/quotes.json", function(data){
|
|
let index = data[Math.floor(Math.random() * data.length)];
|
|
if(index.includes("OGNUM1") && index.includes("SQRTNUM1")) {
|
|
let ognum = Math.floor(Math.random() * 3000);
|
|
index = "the square root of " + ognum + " is " + Math.sqrt(ognum)
|
|
} else if(index.includes("CURRENTURL")) {
|
|
index = window.location.hostname
|
|
}
|
|
$("p#randomquote").text(index)
|
|
}) |