fixed register page

This commit is contained in:
MathMan05
2024-07-01 14:04:26 -05:00
parent dfb20c60ab
commit 9311914ae9
9 changed files with 85 additions and 4 deletions

View File

@@ -36,6 +36,7 @@ class File{
img.src=src;
img.height=this.height;
img.width=this.width;
console.log(this.width,this.height)
return img;
}else if(this.content_type.startsWith('video/')){
const video=document.createElement("video");

View File

@@ -76,7 +76,6 @@ class Guild{
settings.show();
}
constructor(JSON,owner:Localuser,member){
if(JSON===-1){
return;
}

View File

@@ -233,3 +233,4 @@ if ("serviceWorker" in navigator){
}
})
}
export {checkInstance};

View File

@@ -35,6 +35,5 @@
</form>
<a href="/login.html">Already have an account?</a>
</div>
<script src="/login.js"></script>
<script src="/register.js"></script>
<script src="/register.js" type="module"></script>
</body>

View File

@@ -1,3 +1,4 @@
import {checkInstance} from "./login.js";
if(document.getElementById("register")){
document.getElementById("register").addEventListener("submit", registertry);
}
@@ -48,7 +49,7 @@ async function tosLogic(){
if(tosPage){
document.getElementById("TOSbox").innerHTML="I agree to the <a href=\"\" id=\"TOSa\">Terms of Service</a>:";
TOSa=document.getElementById("TOSa");
TOSa.href=tosPage;
(TOSa as HTMLAnchorElement).href=tosPage;
}else{
document.getElementById("TOSbox").textContent="This instance has no Terms of Service, accept ToS anyways:";
TOSa=null;