From f06d0aabc8df1b681e43cc72db0cd604f3fdedf6 Mon Sep 17 00:00:00 2001 From: amelia Date: Wed, 6 Apr 2022 16:38:58 -0500 Subject: Add files via upload --- index.html | 127 ++++++++++++++++++++++++++++++++++++++++++++----------------- 1 file changed, 93 insertions(+), 34 deletions(-) (limited to 'index.html') diff --git a/index.html b/index.html index 776f364..658dc61 100644 --- a/index.html +++ b/index.html @@ -5,10 +5,13 @@ Antheia - + @@ -91,6 +94,22 @@ } function drag(ev) { ev.dataTransfer.setData("text", ev.target.id); + } + function drop2(ev, index) { + ev.preventDefault(); + + var data = ev.dataTransfer.getData("text"); + + storage=getCookie("storage") + storage=JSON.parse(storage) + inv=getCookie("inv") + inv=JSON.parse(inv) + console.log(storage) + storage.push(inv[data]) + inv.splice(data,1) + createCookie('inv', JSON.stringify(inv)) + createCookie('storage', JSON.stringify(storage)) + } function drop(ev, index) { ev.preventDefault(); @@ -165,8 +184,12 @@ } function updateInv() { var inve = document.getElementById("inv"); + var store = document.getElementById("storage"); + console.log(store.innerHTML) var inv = getCookie('inv'); inv = JSON.parse(inv) + var storage = getCookie('storage'); + storage = JSON.parse(storage) var balance = document.getElementById("balance"); balance.innerHTML = getCookie("bank") + " (" + getRank() + ")" let i = "" @@ -178,7 +201,7 @@ */ for (let item of inv) { - + if(!item.storage){ let t = '{color:' + String(item.color) + ', rarity:' + String(item.rarity) + ', value: ' + String(item.value) + '}' if(item.s){ i += ("
" + t + " //shiny!
") @@ -186,9 +209,26 @@ } else { i += ("
" + t + "
") } + } else { + + } } inve.innerHTML = i + let s = "storage:[
" + for (let item of storage) { + + + let t = '{color:' + String(item.color) + ', rarity:' + String(item.rarity) + ', value: ' + String(item.value) + '}' + if(item.s){ + s += ("
" + t + " //shiny!
") + + } else { + s += ("
" + t + "
") + } + + } + store.innerHTML = s } function clear() { @@ -318,6 +358,17 @@ setFavicon.setAttribute('href',favImg); headTitle.appendChild(setFavicon); } + document.write("
\ +
_______________________
.-'~~~-.
\ +
_____________________
.'o oOOOo`.
\ +
____________________
:~~~-.oOo o`.
\ +
______________________
`. \ ~-. oOOo.
\ +
_______________________
`.; / ~. OO:
\ +
_______________________
.' ;-- `.o.'
\ +
______________________
,' ; ~~--'~
\ +
______________________
; ;
\ +_______\|/__________\\;_\\//___\|/________
") + setFavicons('https://raw.githubusercontent.com/squiresgrant/Antheia/main/icon.ico'); var bank = getCookie('bank'); var inv = getCookie('inv'); @@ -327,42 +378,16 @@ setFavicons('https://raw.githubusercontent.com/squiresgrant/Antheia/main/icon.ic document.write("inv:{ //https://github.com/squiresgrant v1.2+1 \<3
") document.write("items:[
") document.write("
") - for (let item of inv) { - - let t = '{color:' + String(item.color) + ', rarity:' + String(item.rarity) + ', value: ' + String(item.value) + '}' - console.log(item) - if(item.s){ - document.write("
" + t + "
") - } else { - document.write("
" + t + "
") - } - let th = document.getElementById(inv.indexOf(item)); - th.onmouseover = function () { - th.innerHTML = "sell?" - } - th.onmouseout = function () { - th.innerHTML = t - } - th.onclick = function () { - createCookie('bank', parseInt(getCookie('bank')) + parseInt(item.value)); - inv.splice(inv.indexOf(item), 1) - createCookie('inv', JSON.stringify(inv)); - - } - } + document.write("
") document.write("],
") document.write("
storage:[
") let storage = getCookie("storage") storage=JSON.parse(storage) - if(storage.length == 0){ + document.write("/* drag items here to prevent them from being sold! */") - } else { - for(let item of storage){ - document.write(item) - } - } - document.write("
]
") + document.write("") + document.write("]") document.write("bank:
" + bank + " (" + getRank() + ")
") document.write("}") document.write("") @@ -418,7 +443,41 @@ setFavicons('https://raw.githubusercontent.com/squiresgrant/Antheia/main/icon.ic - +if you see this;) try refreshing your page! (ctrl+r will work!)
+______________________________....
+___________________________,;;'''';;,____________________,;;;;,
+________________,________;;'_______`;;,_______________.,;;;'___;
+______________,;;;_______;;_________`;;,';;;,.______,%;;'_______'
+____________,;;,;;_______;;_________,;`;;;, `;::. %%;'
+___________;;;,;;;_______`'_______,;;; ;;,;;,_`::,%%;'
+___________;;;,;;;,__________.,%%%%%'%_;;;;,;;___%;;;
+_,%,.______`;;;,;;;,____.,%%%%%%%%%'%;_;;;;;,;;__%;;;
+;,`%%%%%%%%%%`;;,;;'%%%%%%%%%%%%%'%%'__`;;;;;,;, %;;;
+;;;,`%%%%%%%%%%%,;_..`%%%%%%%%;'%%%'____`;;;;,;; %%;;
+_`;;;;;,`%%%%%,;;/,_.._`"""'',%%%%%______`;;;;;; %%;;,
+___`;;;;;;;,;;/////,._____,;%%%%%%%_______`;;;;,`%%;;
+__________;;;/%%%%,%///;;;';%%%%%%,__________`;;;%%;;,
+_________;;;/%%%,%%%%%/;;;';;'%%%%%,____________`%%;;
+________.;;/%%,%%%%%//;;'__;;;'%%%%%,____________%%;;,
+________;;//%,%%%%//;;;'___`;;;;'%%%%_____________`%;;;
+_________;;//%,%//;;;;'______`;;;;'%%%______________%;;;,
+_________`;;//,/;;;'___________`;;;'%%'______________`%;;;
+___________`;;;;'________________`;'%'________________`;;;;
+__________________________________'______.,,,.________`;;;;
+______________________________________,;;;;;;;;;;,_____`;;;;
+_____________________________________;;;'____;;;,;;,____`;;;;
+_____________________________________;;;______;;;;,;;.___`;;;;
+_____________________________________`;;______;;;;;,;;___;;;;
+_______________________________________`'______`;;;;,;;__;;;;
+__________________________________________________`;;,;,_;;;;
+_____________________________________________________;;,_;;;;
+________________________________________________________';;;;;
+_________________________________________________________;;;;;
+________________________________________________________.;;;;'
+_______________________________________________________.;;;;'
+______________________________________________________;;;;;'
+_____________________________________________________,;;;;' //art by susie oviatt (find it here)
+
\ No newline at end of file -- cgit v1.2.3