Minified the svg, and renamed an embed type
This commit is contained in:
parent
5ebf3befb2
commit
ea0a8d963c
3 changed files with 17 additions and 62 deletions
|
@ -6,12 +6,12 @@ class embed{
|
|||
this.json=json;
|
||||
}
|
||||
getType(json){
|
||||
return json.type||"form";
|
||||
return json.type||"rich";
|
||||
}
|
||||
generateHTML(){
|
||||
switch(this.type){
|
||||
case "form":
|
||||
return this.generateForm();
|
||||
case "rich":
|
||||
return this.generateRich();
|
||||
case "image":
|
||||
return this.generateImage();
|
||||
case "link":
|
||||
|
@ -23,7 +23,7 @@ class embed{
|
|||
return document.createElement("div");//prevent errors by giving blank div
|
||||
}
|
||||
}
|
||||
generateForm(){
|
||||
generateRich(){
|
||||
const div=document.createElement("div");
|
||||
div.style.backgroundColor="#"+this.json.color.toString(16);
|
||||
div.classList.add("embed-color");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue