Add files via upload

This commit is contained in:
grant-kun 2022-04-04 12:53:57 -05:00 committed by GitHub
parent 729e62694d
commit dd718f821d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 28 additions and 4 deletions

View File

@ -16,7 +16,16 @@
<script>
let ranks = {
1:"poor",
100:"painter",
500:"carpet weaver",
1000:"graffiti artist",
5000:"caricature artist",
10000:"ascii artist"
}
function createCookie(name, value, days) {
var expires;
if (days) {
@ -47,6 +56,21 @@
}
return "";
}
function getRank(){
bank = getCookie('bank')
for(let k in ranks){
//console.log(k)
//console.log(bank)
if(parseInt(bank)>parseInt(k)){
} else {
return(ranks[k])
}
}
}
console.log(getRank())
function rgbToHex(r, g, b) {
return "#" + ((1 << 24) + (r << 16) + (g << 8) + b).toString(16).slice(1);
}
@ -144,7 +168,7 @@
var inv = getCookie('inv');
inv = JSON.parse(inv)
var balance = document.getElementById("balance");
balance.innerHTML = getCookie("bank")
balance.innerHTML = getCookie("bank") + " <font size=1.5>(" + getRank() + ")</font>"
let i = ""
/*
for(let item of inv){
@ -251,7 +275,7 @@
var inv = getCookie('inv');
inv = JSON.parse(inv)
document.write("<div style='position:absolute;right:5%;'>")
document.write("inv:{ //<a style='color:#696969;' href = \"https://github.com/squiresgrant\">https://github.com/squiresgrant</a> <a style='color:pink;' href=\"https://github.com/squiresgrant/colors\">v1.2+1</a><a style='color=purple;'>\<3</a></br>")
document.write("inv:{ //<a style='color:#696969;' href = \"https://github.com/squiresgrant\">https://github.com/squiresgrant</a> <a style='color:pink;' href=\"https://github.com/squiresgrant/colors\">v1.2+1</a><a style='color=purple;'> \<3</a></br>")
document.write("items:[</br>")
document.write("<div id='inv'>")
for (let item of inv) {
@ -274,7 +298,7 @@
}
document.write("</div>")
document.write("],</br>")
document.write("bank:<div id='balance'>" + bank + "</br></div>")
document.write("bank:<div id='balance'>" + bank + " <font size=1.5> (" + getRank() + ")</font></br></div>")
document.write("}")
document.write("</div>")
for (let crate of data.crates) {