compiled JS

This commit is contained in:
MathMan05 2024-08-20 09:24:37 -05:00
parent 22fecfe6ad
commit cc6b389448
2 changed files with 8 additions and 0 deletions

View file

@ -8,6 +8,7 @@ import { Settings, RoleList } from "./settings.js";
import { Role } from "./role.js"; import { Role } from "./role.js";
import { InfiniteScroller } from "./infiniteScroller.js"; import { InfiniteScroller } from "./infiniteScroller.js";
import { SnowFlake } from "./snowflake.js"; import { SnowFlake } from "./snowflake.js";
import { MarkDown } from "./markdown.js";
class Channel { class Channel {
editing; editing;
type; type;
@ -652,6 +653,12 @@ class Channel {
const prom = this.infinite.delete(); const prom = this.infinite.delete();
history.pushState(null, "", "/channels/" + this.guild_id + "/" + this.snowflake); history.pushState(null, "", "/channels/" + this.guild_id + "/" + this.snowflake);
document.getElementById("channelname").textContent = "#" + this.name; document.getElementById("channelname").textContent = "#" + this.name;
if (this.topic) {
document.getElementById("channelTopic").innerHTML = new MarkDown(this.topic, this).makeHTML().innerHTML;
document.getElementById("channelTopic").removeAttribute("hidden");
}
else
document.getElementById("channelTopic").setAttribute("hidden", "");
const loading = document.getElementById("loadingdiv"); const loading = document.getElementById("loadingdiv");
Channel.regenLoadingMessages(); Channel.regenLoadingMessages();
loading.classList.add("loading"); loading.classList.add("loading");

View file

@ -136,6 +136,7 @@ class Group extends Channel {
this.buildmessages(); this.buildmessages();
history.pushState(null, null, "/channels/" + this.guild_id + "/" + this.snowflake); history.pushState(null, null, "/channels/" + this.guild_id + "/" + this.snowflake);
document.getElementById("channelname").textContent = "@" + this.name; document.getElementById("channelname").textContent = "@" + this.name;
document.getElementById("channelTopic").setAttribute("hidden", "");
document.getElementById("typebox").contentEditable = "" + true; document.getElementById("typebox").contentEditable = "" + true;
} }
messageCreate(messagep) { messageCreate(messagep) {