MCPcopy Create free account
hub / github.com/MathMan05/Fermi / generateHTMLArea

Method generateHTMLArea

src/webpage/settings.ts:99–123  ·  view source on GitHub ↗
(buttonInfo: Options | string, htmlarea: HTMLElement)

Source from the content-addressed store, hash-verified

97 const button = document.createElement(head ? "span" : "button");
98 this.buttonMap.set(inner, button);
99 button.classList.add(
100 ...[head ? "headSetting" : "SettingsButton", contained ? "settingsIndent" : ""].filter(
101 (_) => _,
102 ),
103 );
104 button.textContent = name;
105 if (!head)
106 button.onclick = (_) => {
107 this.generateHTMLArea(inner, optionsArea);
108 optionsArea.classList.remove("mobileHidden");
109 if (this.warndiv) {
110 this.warndiv.remove();
111 }
112 };
113 if (color === buttonColor.RED) {
114 button.classList.add("settingRed");
115 }
116 return button;
117 }
118 generateButtons(optionsArea: HTMLElement) {
119 const buttonTable = document.createElement("div");
120 buttonTable.classList.add("settingbuttons");
121 if (this.top) {
122 buttonTable.classList.add("flexltr");
123 }
124 for (const button of this.buttons) {
125 buttonTable.append(this.makeButtonHTML(button, optionsArea));
126 }

Callers 5

generateHTMLMethod · 0.95
makeButtonHTMLMethod · 0.95
createGuildMethod · 0.80
deleteRoleMethod · 0.80
buttonListGenMethod · 0.80

Calls 4

handleStringMethod · 0.95
addMethod · 0.80
generateHTMLMethod · 0.65
removeMethod · 0.45

Tested by

no test coverage detected