diff --git a/docker-compose.yml b/docker-compose.yml deleted file mode 100644 index a60600e..0000000 --- a/docker-compose.yml +++ /dev/null @@ -1,47 +0,0 @@ -# These are supposed to run and tested indenpendently, not at the same time. Please -# build them however you like, but always run each at a time if testing for GUI. - -services: - debian-bookworm: - build: - context: . - dockerfile: ./docker/Dockerfile.bookworm - ports: - - "5900:5900" - volumes: - - ./docker/start.sh:/start.sh - command: ["/bin/bash", "/start.sh"] - - archlinux: - build: - context: . - dockerfile: ./docker/Dockerfile.pacman - ports: - - "5901:5900" - volumes: - - ./docker/start.sh:/start.sh - command: ["/bin/bash", "/start.sh"] - - ubuntu: - build: - context: . - dockerfile: ./docker/Dockerfile.ubuntu - ports: - - "5902:5900" - volumes: - - ./docker/start.sh:/start.sh - command: ["/bin/bash", "/start.sh"] - - debian-trixie: - build: - context: . - dockerfile: ./docker/Dockerfile.trixie - ports: - - "5900:5900" - volumes: - - ./docker/start.sh:/start.sh - command: ["/bin/bash", "/start.sh"] - -networks: - default: - driver: bridge \ No newline at end of file diff --git a/docker/Dockerfile.bookworm b/docker/Dockerfile.bookworm deleted file mode 100644 index 638afee..0000000 --- a/docker/Dockerfile.bookworm +++ /dev/null @@ -1,21 +0,0 @@ -FROM debian:bookworm - -WORKDIR /app - -COPY ./dist/*.deb . - -RUN < { - const versionElm = document.createElement("style"); - versionElm.appendChild(document.createTextNode(\` - div[class*="compactInfo"] { - margin-bottom: 15px; - } - div[class*="compactInfo"] > span::before { - content: "Legcord Version: ${version}"; - color: inherit; - position: absolute; - margin-top: 20px; - } - \`)); - document.body.append(versionElm); - })()`); + const observer = new MutationObserver(() => { + if (document.body.querySelector("#ac-ver")) return; + + const info = document.body.querySelector('[class*="sidebar"] [class*="compactInfo"]'); + const host = info?.parentElement; + if (!host || !/(stable|ptb|canary) \d+|Electron|Chromium/i.test(host.textContent)) return; + + const el = host.querySelector("span")!.cloneNode() as HTMLSpanElement; + el.id = "ac-ver"; + el.textContent = `Legcord Version: ${version}`; + info.after(el); + observer.disconnect(); + }); + observer.observe(document.body, { childList: true, subtree: true }); } load();