Added BitNode multipliers for purchased servers. Fixed bugs in new Script Editor implementation. Added documentation for script editors

This commit is contained in:
danielyxie
2019-01-29 22:02:27 -08:00
parent d54f0906f0
commit a09ea46a38
31 changed files with 3355 additions and 2558 deletions
+8 -2
View File
@@ -5,9 +5,15 @@ import { getElementById } from "./getElementById";
* replacing. Then returns the new cloned element.
* @param elemId The HTML ID to retrieve the element by.
*/
export function clearEventListeners(elemId: string): HTMLElement | null {
export function clearEventListeners(elemId: string | HTMLElement): HTMLElement | null {
try {
const elem: HTMLElement = getElementById(elemId);
let elem: HTMLElement;
if (typeof elemId === "string") {
elem = getElementById(elemId);
} else {
elem = elemId;
}
const newElem: HTMLElement = elem.cloneNode(true) as HTMLElement;
if (elem.parentNode !== null) {
elem.parentNode.replaceChild(newElem, elem);