format: run prettify

This commit is contained in:
SethBurkart123
2025-05-05 18:04:10 +10:00
parent 771169348f
commit 0f9f618164
142 changed files with 28768 additions and 20790 deletions
@@ -1,13 +1,13 @@
import stringToHTML from "../stringToHTML"
import stringToHTML from "../stringToHTML";
export function CreateCustomShortcutDiv(element: any) {
// Creates the stucture and element information for each seperate shortcut
var shortcut = document.createElement("a")
shortcut.setAttribute("href", element.url)
shortcut.setAttribute("target", "_blank")
var shortcutdiv = document.createElement("div")
shortcutdiv.classList.add("shortcut")
shortcutdiv.classList.add("customshortcut")
var shortcut = document.createElement("a");
shortcut.setAttribute("href", element.url);
shortcut.setAttribute("target", "_blank");
var shortcutdiv = document.createElement("div");
shortcutdiv.classList.add("shortcut");
shortcutdiv.classList.add("customshortcut");
let image = stringToHTML(
`
@@ -25,13 +25,13 @@ export function CreateCustomShortcutDiv(element: any) {
</text>
</svg>
`,
).firstChild
;(image as HTMLElement).classList.add("shortcuticondiv")
var text = document.createElement("p")
text.textContent = element.name
shortcutdiv.append(image!)
shortcutdiv.append(text)
shortcut.append(shortcutdiv)
).firstChild;
(image as HTMLElement).classList.add("shortcuticondiv");
var text = document.createElement("p");
text.textContent = element.name;
shortcutdiv.append(image!);
shortcutdiv.append(text);
shortcut.append(shortcutdiv);
document.getElementById("shortcuts")!.append(shortcut)
}
document.getElementById("shortcuts")!.append(shortcut);
}
+25 -25
View File
@@ -1,26 +1,26 @@
export function CreateElement(
type: string,
class_?: any,
id?: any,
innerText?: string,
innerHTML?: string,
style?: string,
) {
let element = document.createElement(type)
if (class_ !== undefined) {
element.classList.add(class_)
}
if (id !== undefined) {
element.id = id
}
if (innerText !== undefined) {
element.innerText = innerText
}
if (innerHTML !== undefined) {
element.innerHTML = innerHTML
}
if (style !== undefined) {
element.style.cssText = style
}
return element
}
type: string,
class_?: any,
id?: any,
innerText?: string,
innerHTML?: string,
style?: string,
) {
let element = document.createElement(type);
if (class_ !== undefined) {
element.classList.add(class_);
}
if (id !== undefined) {
element.id = id;
}
if (innerText !== undefined) {
element.innerText = innerText;
}
if (innerHTML !== undefined) {
element.innerHTML = innerHTML;
}
if (style !== undefined) {
element.style.cssText = style;
}
return element;
}