import util from "./util" import {AdapterState, AdapterData} from "./adapter"; import {Message, Attachment, Author} from "./message" import {Settings} from "./settings" import { MessageElement } from "./message-element" import { SettingsElement } from "./settings-element" import { ProfileElement } from "./profile-element" import { AuthorMessagesElement } from "./author-messages-element" import { TimelineElement } from "./timeline-element" import {DatagramSocket} from "./websocket" function main() { const saveData = localStorage.getItem("underbbs_settings"); Settings._instance = saveData ? JSON.parse(saveData) : new Settings(); customElements.define("underbbs-message", MessageElement); customElements.define("underbbs-settings", SettingsElement); customElements.define("underbbs-profile", ProfileElement); customElements.define("underbbs-author-messages", AuthorMessagesElement); customElements.define("underbbs-timeline", TimelineElement); util._("closeErr", util.closeErr); let settingsParent = util.$("settings_parent"); if (settingsParent) { settingsParent.innerHTML = `` } let profileParent = util.$("profile_parent"); if (profileParent) { profileParent.innerHTML = "" } let honksParent = util.$("honks_parent"); if (honksParent) { honksParent.innerHTML = ""; } let timelineParent = util.$("timeline_parent"); if (timelineParent) { timelineParent.innerHTML = ""; } } main();