From 83b4f75e8733adeef1f98148444577fc82cbec45 Mon Sep 17 00:00:00 2001 From: smartfridge <37928912+smartfrigde@users.noreply.github.com> Date: Tue, 12 Jul 2022 16:10:41 +0200 Subject: [PATCH] Add experimental Hummus support --- src/content/setup.html | 1 + src/content/splash.html | 3 +++ src/extensions/mods.ts | 3 ++- src/preload/capturer.ts | 4 ---- src/preload/preload.ts | 2 +- src/preload/titlebar.ts | 5 +++++ src/settings/settings.html | 1 + 7 files changed, 13 insertions(+), 6 deletions(-) diff --git a/src/content/setup.html b/src/content/setup.html index a19c248..a0f8540 100644 --- a/src/content/setup.html +++ b/src/content/setup.html @@ -31,6 +31,7 @@ +

diff --git a/src/content/splash.html b/src/content/splash.html index 8bca30c..0378dd1 100644 --- a/src/content/splash.html +++ b/src/content/splash.html @@ -58,6 +58,9 @@ case "ptb": window.location.replace("https://ptb.discord.com/app"); break; + case "hummus": + window.location.replace("https://hummus.sys42.net/"); + break; case undefined: window.location.replace("https://discord.com/app"); break; diff --git a/src/extensions/mods.ts b/src/extensions/mods.ts index edf1d9a..fb2c5c2 100644 --- a/src/extensions/mods.ts +++ b/src/extensions/mods.ts @@ -27,7 +27,8 @@ const unstrictCSP = () => { "https://api.goosemod.com/inject.js", "https://raw.githubusercontent.com/Cumcord/Cumcord/stable/dist/build.js", "https://raw.githubusercontent.com/Cumcord/Cumcord/master/dist/build.js", - "https://raw.githubusercontent.com/FlickerMod/dist/main/build.js" + "https://raw.githubusercontent.com/FlickerMod/dist/main/build.js", + "https://localhost:1234/dist.js" ]; electron.session.defaultSession.webRequest.onHeadersReceived(({responseHeaders, url}, done) => { diff --git a/src/preload/capturer.ts b/src/preload/capturer.ts index 32c750f..9075e5c 100644 --- a/src/preload/capturer.ts +++ b/src/preload/capturer.ts @@ -42,10 +42,6 @@ export async function getDisplayMediaSelector() { `; } -const screenShareCSS = ` - -`; - const screenShareJS = ` window.navigator.mediaDevices.getDisplayMedia = () => new Promise(async (resolve, reject) => { try { diff --git a/src/preload/preload.ts b/src/preload/preload.ts index 5f91140..ac6ccf7 100644 --- a/src/preload/preload.ts +++ b/src/preload/preload.ts @@ -28,7 +28,7 @@ const clientMods = { flicker: "https://raw.githubusercontent.com/FlickerMod/dist/main/build.js" }; -console.log("ArmCord"); +console.log("ArmCord " + version); ipcRenderer.on("themeLoader", (event, message) => { addStyle(message); }); diff --git a/src/preload/titlebar.ts b/src/preload/titlebar.ts index a3fe1bc..5bbcc7e 100644 --- a/src/preload/titlebar.ts +++ b/src/preload/titlebar.ts @@ -5,6 +5,11 @@ import * as path from "path"; import os from "os"; export function injectTitlebar() { document.addEventListener("DOMContentLoaded", function (event) { + if (window.armcord.channel == "hummus") { + window.alert( + "ArmCord Titlebar doesn't currently work well in Hummus, please change ArmCord style to native for better experience." + ); + } var elem = document.createElement("div"); elem.innerHTML = `