diff --git a/webpage/index.js b/webpage/index.js
index fdea7ca..44e73e6 100644
--- a/webpage/index.js
+++ b/webpage/index.js
@@ -529,7 +529,7 @@ const images=[];
const imageshtml=[];
function createunknown(fname,fsize,src){
const div=document.createElement("table");
- div.classList.add("unkownfile");
+ div.classList.add("unknownfile");
const nametr=document.createElement("tr");
div.append(nametr);
const fileicon=document.createElement("td");
diff --git a/webpage/login.js b/webpage/login.js
index ff20893..27f048b 100644
--- a/webpage/login.js
+++ b/webpage/login.js
@@ -10,40 +10,41 @@ function setTheme(){
document.body.className=name+"-theme";
}
setTheme();
-{
- const instancein=document.getElementById("instancein");
- let timeout=0;
- async function check(e){
- try{
- verify.innerText="Checking Instance"
- instanceinfo=await setInstance(instancein.value)
- localStorage.setItem("instanceinfo",JSON.stringify(instanceinfo));
- verify.innerText="Instance is all good"
- setTimeout(_=>{
- console.log(verify.innerText)
- verify.innerText="";
- },3000);
- }catch(e){
- console.log("catch")
- verify.innerText="Invalid Instance, try again"
- }
- }
- if(instancein){
- console.log(instancein)
- instancein.addEventListener("keydown",e=>{
- const verify=document.getElementById("verify");
- verify.innerText="Waiting to check Instance"
- clearTimeout(timeout);
- timeout=setTimeout(check,1000);
- });
- }
- if(localStorage.getItem("instanceinfo")){
- instancein.value=localStorage.getItem("instanceinfo").wellKnown
- }else{
- check("https://spacebar.chat/");
+const instancein=document.getElementById("instancein");
+let timeout=0;
+async function checkInstance(e){
+ try{
+ verify.innerText="Checking Instance"
+ instanceinfo=await setInstance(instancein.value)
+ localStorage.setItem("instanceinfo",JSON.stringify(instanceinfo));
+ verify.innerText="Instance is all good"
+ if(checkInstance.alt){checkInstance.alt();}
+ setTimeout(_=>{
+ console.log(verify.innerText)
+ verify.innerText="";
+ },3000);
+
+ }catch(e){
+ console.log("catch")
+ verify.innerText="Invalid Instance, try again"
}
}
+if(instancein){
+ console.log(instancein)
+ instancein.addEventListener("keydown",e=>{
+ const verify=document.getElementById("verify");
+ verify.innerText="Waiting to check Instance"
+ clearTimeout(timeout);
+ timeout=setTimeout(checkInstance,1000);
+ });
+}
+if(localStorage.getItem("instanceinfo")){
+ instancein.value=JSON.parse(localStorage.getItem("instanceinfo")).wellknown
+}else{
+ checkInstance("https://spacebar.chat/");
+}
+
async function login(username, password){
const options={
method: "POST",
diff --git a/webpage/register.html b/webpage/register.html
index ad7b117..9a85662 100644
--- a/webpage/register.html
+++ b/webpage/register.html
@@ -23,8 +23,12 @@
-
-