Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
theLemon505 authored Dec 4, 2021
1 parent 770e6b9 commit 02d2fc6
Showing 1 changed file with 24 additions and 64 deletions.
88 changes: 24 additions & 64 deletions chain.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class Chain extends HTMLElement{
class Node extends HTMLElement{
constructor(){
super();
this.link = null;
Expand Down Expand Up @@ -92,46 +92,26 @@ class Chain extends HTMLElement{
this.removeAttribute('if')
}
}

updateRendering(){
if(this.if === null){
return
}
if(eval(this.and) === true){
if(this.if !== null){
if(this.if !== null && this.var !== null && this.varif !== null){
if(eval(this.if) && document.getElementById(this.var).getAttribute('val') === this.varif){
this.changePage();
}
}
}
if(eval(this.and) === false){
if(eval(this.if)){
this.changePage();
}
if(document.getElementById(this.var).getAttribute('val') !== this.varif){
return
}
if(document.getElementById(this.var).getAttribute('val') === this.varif){
this.changePage();
}
if(this.function !== null){
eval(this.function)
if(this.and === null || eval(this.and) === false){
if(this.if !== null || this.var !== null && this.varif !== null){
if(eval(this.if) || document.getElementById(this.var).getAttribute('val') === this.varif){
this.changePage();
}
}
}

if(eval(this.and) === null){
if(eval(this.if)){
this.changePage();
}
if(document.getElementById(this.var).getAttribute('val') !== this.varif){
return
}
if(document.getElementById(this.var).getAttribute('val') === this.varif){
this.changePage();
}
if(this.function !== null){
eval(this.function)
}
if(this.function !== null){
eval(this.function)
}
if(this.if === null && this.var === null && this.varif === null){
this.changePage();
}
}
changePage(){
Expand Down Expand Up @@ -235,44 +215,25 @@ class Link extends HTMLElement{
}

updateRendering(){
if(this.if === null){
return
}
if(eval(this.and) === true){
if(this.if !== null){
if(this.if !== null && this.var !== null && this.varif !== null){
if(eval(this.if) && document.getElementById(this.var).getAttribute('val') === this.varif){
this.changePage();
}
}
}
if(eval(this.and) === false){
if(eval(this.if)){
this.changePage();
}
if(document.getElementById(this.var).getAttribute('val') !== this.varif){
return
}
if(document.getElementById(this.var).getAttribute('val') === this.varif){
this.changePage();
}
if(this.function !== null){
eval(this.function)
if(this.and === null || eval(this.and) === false){
if(this.if !== null || this.var !== null && this.varif !== null){
if(eval(this.if) || document.getElementById(this.var).getAttribute('val') === this.varif){
this.changePage();
}
}
}

if(eval(this.and) === null){
if(eval(this.if)){
this.changePage();
}
if(document.getElementById(this.var).getAttribute('val') !== this.varif){
return
}
if(document.getElementById(this.var).getAttribute('val') === this.varif){
this.changePage();
}
if(this.function !== null){
eval(this.function)
}
if(this.function !== null){
eval(this.function)
}
if(this.if === null && this.var === null && this.varif === null){
this.changePage();
}
}

Expand Down Expand Up @@ -307,10 +268,9 @@ class Var extends HTMLElement{
}

update(){
console.log(this.val);
}
}

customElements.define("chain-link", Link);
customElements.define("chain-var", Var);
customElements.define("chain-node", Chain);
customElements.define("chain-node", Node);

0 comments on commit 02d2fc6

Please sign in to comment.