Add experimental Hummus support

This commit is contained in:
smartfridge 2022-07-12 16:10:41 +02:00
parent 5b509d948f
commit 83b4f75e87
7 changed files with 13 additions and 6 deletions

View File

@ -31,6 +31,7 @@
<option value="stable">Stable</option> <option value="stable">Stable</option>
<option value="canary">Canary</option> <option value="canary">Canary</option>
<option value="ptb">PTB</option> <option value="ptb">PTB</option>
<option value="hummus">Hummus (unofficial)</option>
</select> </select>
</div> </div>
<p class="text-center setup-ask" id="setup_question3"> <p class="text-center setup-ask" id="setup_question3">

View File

@ -58,6 +58,9 @@
case "ptb": case "ptb":
window.location.replace("https://ptb.discord.com/app"); window.location.replace("https://ptb.discord.com/app");
break; break;
case "hummus":
window.location.replace("https://hummus.sys42.net/");
break;
case undefined: case undefined:
window.location.replace("https://discord.com/app"); window.location.replace("https://discord.com/app");
break; break;

View File

@ -27,7 +27,8 @@ const unstrictCSP = () => {
"https://api.goosemod.com/inject.js", "https://api.goosemod.com/inject.js",
"https://raw.githubusercontent.com/Cumcord/Cumcord/stable/dist/build.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/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) => { electron.session.defaultSession.webRequest.onHeadersReceived(({responseHeaders, url}, done) => {

View File

@ -42,10 +42,6 @@ export async function getDisplayMediaSelector() {
</div>`; </div>`;
} }
const screenShareCSS = `
`;
const screenShareJS = ` const screenShareJS = `
window.navigator.mediaDevices.getDisplayMedia = () => new Promise(async (resolve, reject) => { window.navigator.mediaDevices.getDisplayMedia = () => new Promise(async (resolve, reject) => {
try { try {

View File

@ -28,7 +28,7 @@ const clientMods = {
flicker: "https://raw.githubusercontent.com/FlickerMod/dist/main/build.js" flicker: "https://raw.githubusercontent.com/FlickerMod/dist/main/build.js"
}; };
console.log("ArmCord"); console.log("ArmCord " + version);
ipcRenderer.on("themeLoader", (event, message) => { ipcRenderer.on("themeLoader", (event, message) => {
addStyle(message); addStyle(message);
}); });

View File

@ -5,6 +5,11 @@ import * as path from "path";
import os from "os"; import os from "os";
export function injectTitlebar() { export function injectTitlebar() {
document.addEventListener("DOMContentLoaded", function (event) { 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"); var elem = document.createElement("div");
elem.innerHTML = `<nav class="titlebar"> elem.innerHTML = `<nav class="titlebar">
<div class="window-title" id="window-title"></div> <div class="window-title" id="window-title"></div>

View File

@ -51,6 +51,7 @@
<option value="stable">Stable</option> <option value="stable">Stable</option>
<option value="canary">Canary</option> <option value="canary">Canary</option>
<option value="ptb">PTB</option> <option value="ptb">PTB</option>
<option value="hummus">Hummus (unofficial)</option>
</select> </select>
<p class="header" id="settings-channel">Discord channel:</p> <p class="header" id="settings-channel">Discord channel:</p>
</div> </div>