From 0bce5ec4d16e8fbb4daa125493a802073dd58bcf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Ml=C3=A1dek?= Date: Tue, 17 Sep 2024 21:08:41 +0200 Subject: [PATCH] add ui hiding --- index.mts | 6 ++++++ jitsi-hide.css | 12 ++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 jitsi-hide.css diff --git a/index.mts b/index.mts index 3ef1389..649f0a2 100644 --- a/index.mts +++ b/index.mts @@ -1,4 +1,5 @@ import puppeteer from "puppeteer"; +import { readFileSync } from "fs"; import pino from "pino"; const logger = pino({ level: "debug", @@ -27,6 +28,11 @@ await page.evaluate(() => { document.querySelector("body")!.requestFullscreen(); }); +logger.debug("Injecting CSS"); +await page.addStyleTag({ + content: readFileSync("jitsi-hide.css", "utf-8"), +}); + browser.on("disconnected", () => { logger.info("Browser disconnected, exiting"); process.exit(0); diff --git a/jitsi-hide.css b/jitsi-hide.css new file mode 100644 index 0000000..9cfe078 --- /dev/null +++ b/jitsi-hide.css @@ -0,0 +1,12 @@ +.new-toolbox, +.filmstrip, +.with-filmstrip, +.subject, +.atlaskit-portal-container, +.atlaskit-portal { + display: none !important; +} + +.watermark { + display: none !important; +}