From f887513e0953ec8a15fd02c5a763b8ad26039822 Mon Sep 17 00:00:00 2001 From: smartfridge <37928912+smartfrigde@users.noreply.github.com> Date: Mon, 10 May 2021 16:35:07 +0200 Subject: [PATCH 01/19] Follow Discord tray behaviour --- main.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/main.js b/main.js index dd0ff40..565d915 100644 --- a/main.js +++ b/main.js @@ -73,6 +73,9 @@ function createWindow() { }, }, ]); + appIcon.on("click", () => { + mainWindow.show() + }); appIcon.setContextMenu(contextMenu); From 522ffa9ea0e9759390604a65f04fa7c7a0c6c5c8 Mon Sep 17 00:00:00 2001 From: smartfridge <37928912+smartfrigde@users.noreply.github.com> Date: Fri, 14 May 2021 16:59:42 +0200 Subject: [PATCH 02/19] Tweak electon-forge config --- package.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 0eec7e7..dd09d8d 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,6 @@ "main": "main.js", "scripts": { "start": "electron-forge start", - "dist": "electron-builder", "test": "echo \"Error: no test specified\" && exit 1", "package": "electron-forge package", "publish": "electron-forge publish", @@ -44,7 +43,9 @@ "homepage": "https://github.com/smartfrigde/armcord#readme", "config": { "forge": { - "packagerConfig": {}, + "packagerConfig": { + "icon": "discord.png" + }, "makers": [ { "name": "@electron-forge/maker-squirrel", From d5012e79a15069bba3e97a33ce9e77322837d3e7 Mon Sep 17 00:00:00 2001 From: smartfridge <37928912+smartfrigde@users.noreply.github.com> Date: Fri, 14 May 2021 17:00:00 +0200 Subject: [PATCH 03/19] Bump version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index dd09d8d..3ff0d25 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "armcord", - "version": "2.4.0", + "version": "2.5.0", "description": "ArmCord is a Discord client made for ARM Linux that allows you to customize your experience.", "main": "main.js", "scripts": { From 3b35a9f8888f068834403e2e71f0a224649a24a9 Mon Sep 17 00:00:00 2001 From: smartfridge <37928912+smartfrigde@users.noreply.github.com> Date: Fri, 14 May 2021 17:03:08 +0200 Subject: [PATCH 04/19] Bump version and remove vulnerabilities (npm audit fix) --- package-lock.json | 74 +++++++++++++++++++++++------------------------ 1 file changed, 37 insertions(+), 37 deletions(-) diff --git a/package-lock.json b/package-lock.json index e5d0f06..86f2969 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,11 +1,11 @@ { "name": "armcord", - "version": "2.3.0", + "version": "2.5.0", "lockfileVersion": 2, "requires": true, "packages": { "": { - "version": "2.3.0", + "version": "2.5.0", "license": "MIT", "dependencies": { "custom-electron-titlebar": "3.2.6", @@ -4029,6 +4029,12 @@ "node": ">=0.10.0" } }, + "node_modules/hosted-git-info": { + "version": "2.8.9", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", + "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", + "dev": true + }, "node_modules/http-cache-semantics": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz", @@ -4428,9 +4434,9 @@ } }, "node_modules/lodash": { - "version": "4.17.20", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", - "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", "dev": true }, "node_modules/lodash._reinterpolate": { @@ -5090,12 +5096,6 @@ "validate-npm-package-license": "^3.0.1" } }, - "node_modules/normalize-package-data/node_modules/hosted-git-info": { - "version": "2.8.8", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.8.tgz", - "integrity": "sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg==", - "dev": true - }, "node_modules/normalize-package-data/node_modules/semver": { "version": "5.7.1", "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", @@ -5639,14 +5639,14 @@ } }, "node_modules/plist": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/plist/-/plist-3.0.1.tgz", - "integrity": "sha512-GpgvHHocGRyQm74b6FWEZZVRroHKE1I0/BTjAmySaohK+cUn+hZpbqXkc3KWgW3gQYkqcQej35FohcT0FRlkRQ==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/plist/-/plist-3.0.2.tgz", + "integrity": "sha512-MSrkwZBdQ6YapHy87/8hDU8MnIcyxBKjeF+McXnr5A9MtffPewTs7G3hlpodT5TacyfIyFTaJEhh3GGcmasTgQ==", "dev": true, "dependencies": { - "base64-js": "^1.2.3", + "base64-js": "^1.5.1", "xmlbuilder": "^9.0.7", - "xmldom": "0.1.x" + "xmldom": "^0.5.0" }, "engines": { "node": ">=6" @@ -6916,12 +6916,12 @@ } }, "node_modules/xmldom": { - "version": "0.1.31", - "resolved": "https://registry.npmjs.org/xmldom/-/xmldom-0.1.31.tgz", - "integrity": "sha512-yS2uJflVQs6n+CyjHoaBmVSqIDevTAWrzMmjG1Gc7h1qQ7uVozNhEPJAwZXWyGQ/Gafo3fCwrcaokezLPupVyQ==", + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/xmldom/-/xmldom-0.5.0.tgz", + "integrity": "sha512-Foaj5FXVzgn7xFzsKeNIde9g6aFBxTPi37iwsno8QvApmtg7KYrr+OPyRHcJF7dud2a5nGRBXK3n0dL62Gf7PA==", "dev": true, "engines": { - "node": ">=0.1" + "node": ">=10.0.0" } }, "node_modules/xtend": { @@ -10308,6 +10308,12 @@ "parse-passwd": "^1.0.0" } }, + "hosted-git-info": { + "version": "2.8.9", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", + "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", + "dev": true + }, "http-cache-semantics": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz", @@ -10624,9 +10630,9 @@ } }, "lodash": { - "version": "4.17.20", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", - "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", "dev": true }, "lodash._reinterpolate": { @@ -11155,12 +11161,6 @@ "validate-npm-package-license": "^3.0.1" }, "dependencies": { - "hosted-git-info": { - "version": "2.8.8", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.8.tgz", - "integrity": "sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg==", - "dev": true - }, "semver": { "version": "5.7.1", "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", @@ -11579,14 +11579,14 @@ } }, "plist": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/plist/-/plist-3.0.1.tgz", - "integrity": "sha512-GpgvHHocGRyQm74b6FWEZZVRroHKE1I0/BTjAmySaohK+cUn+hZpbqXkc3KWgW3gQYkqcQej35FohcT0FRlkRQ==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/plist/-/plist-3.0.2.tgz", + "integrity": "sha512-MSrkwZBdQ6YapHy87/8hDU8MnIcyxBKjeF+McXnr5A9MtffPewTs7G3hlpodT5TacyfIyFTaJEhh3GGcmasTgQ==", "dev": true, "requires": { - "base64-js": "^1.2.3", + "base64-js": "^1.5.1", "xmlbuilder": "^9.0.7", - "xmldom": "0.1.x" + "xmldom": "^0.5.0" } }, "prepend-http": { @@ -12615,9 +12615,9 @@ "dev": true }, "xmldom": { - "version": "0.1.31", - "resolved": "https://registry.npmjs.org/xmldom/-/xmldom-0.1.31.tgz", - "integrity": "sha512-yS2uJflVQs6n+CyjHoaBmVSqIDevTAWrzMmjG1Gc7h1qQ7uVozNhEPJAwZXWyGQ/Gafo3fCwrcaokezLPupVyQ==", + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/xmldom/-/xmldom-0.5.0.tgz", + "integrity": "sha512-Foaj5FXVzgn7xFzsKeNIde9g6aFBxTPi37iwsno8QvApmtg7KYrr+OPyRHcJF7dud2a5nGRBXK3n0dL62Gf7PA==", "dev": true }, "xtend": { From 7dab560a994f8708fb1ef7059a7e9984dccb6cdd Mon Sep 17 00:00:00 2001 From: smartfridge <37928912+smartfrigde@users.noreply.github.com> Date: Fri, 14 May 2021 17:17:39 +0200 Subject: [PATCH 05/19] Create theme.html --- theme.html | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 theme.html diff --git a/theme.html b/theme.html new file mode 100644 index 0000000..e69de29 From 38edef38ee77340a65740244b0aff208813c9c15 Mon Sep 17 00:00:00 2001 From: smartfridge <37928912+smartfrigde@users.noreply.github.com> Date: Fri, 14 May 2021 17:35:25 +0200 Subject: [PATCH 06/19] Add shortcut to theme manager and make base for it --- preload.js | 3 +++ renderer.js | 55 --------------------------------------- theme.html | 75 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 78 insertions(+), 55 deletions(-) delete mode 100644 renderer.js diff --git a/preload.js b/preload.js index 137d858..52af680 100644 --- a/preload.js +++ b/preload.js @@ -22,6 +22,9 @@ window.addEventListener("DOMContentLoaded", () => { electronLocalshortcut.register(currentWindow, "F2", () => { window.location.href = "https://discord.com/invite/F25bc4RYDt"; }); + electronLocalshortcut.register(currentWindow, "F3", () => { + window.location.href = "./theme.html"; + }); require("./utils/capturer.js"); ArmCord.addStyle(` diff --git a/renderer.js b/renderer.js deleted file mode 100644 index d2ec9f5..0000000 --- a/renderer.js +++ /dev/null @@ -1,55 +0,0 @@ -// This file is required by the index.html file and will -// be executed in the renderer process for that window. -// All of the Node.js APIs are available in this process. -const remote = require('electron').remote; - -const win = remote.getCurrentWindow(); /* Note this is different to the -html global `window` variable */ - -// When document has loaded, initialise -document.onreadystatechange = (event) => { - if (document.readyState == "complete") { - handleWindowControls(); - - document.getElementById('electron-ver').innerHTML = `${process.versions.electron}` - } -}; - -window.onbeforeunload = (event) => { - /* If window is reloaded, remove win event listeners - (DOM element listeners get auto garbage collected but not - Electron win listeners as the win is not dereferenced unless closed) */ - win.removeAllListeners(); -} - -function handleWindowControls() { - // Make minimise/maximise/restore/close buttons work when they are clicked - document.getElementById('min-button').addEventListener("click", event => { - win.minimize(); - }); - - document.getElementById('max-button').addEventListener("click", event => { - win.maximize(); - }); - - document.getElementById('restore-button').addEventListener("click", event => { - win.unmaximize(); - }); - - document.getElementById('close-button').addEventListener("click", event => { - win.close(); - }); - - // Toggle maximise/restore buttons when maximisation/unmaximisation occurs - toggleMaxRestoreButtons(); - win.on('maximize', toggleMaxRestoreButtons); - win.on('unmaximize', toggleMaxRestoreButtons); - - function toggleMaxRestoreButtons() { - if (win.isMaximized()) { - document.body.classList.add('maximized'); - } else { - document.body.classList.remove('maximized'); - } - } -} \ No newline at end of file diff --git a/theme.html b/theme.html index e69de29..569d7dd 100644 --- a/theme.html +++ b/theme.html @@ -0,0 +1,75 @@ + + + + + + ArmCord Theme Manager + + + + + + + + + \ No newline at end of file From 9608851fa240c93674cffe6f80a024abc5e8f5e0 Mon Sep 17 00:00:00 2001 From: smartfridge <37928912+smartfrigde@users.noreply.github.com> Date: Fri, 14 May 2021 18:01:52 +0200 Subject: [PATCH 07/19] Theme Manager test --- preload.js | 2 +- utils/theme.js | 7 +++++++ utils/themes/revertBrand.css | 1 + 3 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 utils/theme.js create mode 100644 utils/themes/revertBrand.css diff --git a/preload.js b/preload.js index 52af680..80e8eb5 100644 --- a/preload.js +++ b/preload.js @@ -2,7 +2,7 @@ const customTitlebar = require("custom-electron-titlebar"); const electronLocalshortcut = require("electron-localshortcut"); const { remote } = require("electron"); const ArmCord = require("./utils/ArmCord.js"); - +require('./utils/theme.js') window.addEventListener("DOMContentLoaded", () => { new customTitlebar.Titlebar({ backgroundColor: customTitlebar.Color.fromHex("#202225"), diff --git a/utils/theme.js b/utils/theme.js new file mode 100644 index 0000000..e9b5d63 --- /dev/null +++ b/utils/theme.js @@ -0,0 +1,7 @@ +const themeFolder = __dirname + "/themes/"; +const fs = require("fs"); +const armcord = require("./armcord.js") +fs.readdirSync(themeFolder).forEach((file) => { + armcord.addStyle(fs.readFileSync(file)) + console.log(file) +}); diff --git a/utils/themes/revertBrand.css b/utils/themes/revertBrand.css new file mode 100644 index 0000000..104ae18 --- /dev/null +++ b/utils/themes/revertBrand.css @@ -0,0 +1 @@ +@import url('https://Goose-Nest.github.io/GT-RevertRebrand/src/main.css'); \ No newline at end of file From 41306d6cde2211cc49ad898cabaf9cf9f3f0b599 Mon Sep 17 00:00:00 2001 From: smartfridge <37928912+smartfrigde@users.noreply.github.com> Date: Fri, 14 May 2021 20:27:59 +0200 Subject: [PATCH 08/19] Add barebones theme loading! --- utils/theme.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/utils/theme.js b/utils/theme.js index e9b5d63..d5605e6 100644 --- a/utils/theme.js +++ b/utils/theme.js @@ -1,7 +1,14 @@ const themeFolder = __dirname + "/themes/"; const fs = require("fs"); const armcord = require("./armcord.js") +window.addEventListener("DOMContentLoaded", () => { fs.readdirSync(themeFolder).forEach((file) => { - armcord.addStyle(fs.readFileSync(file)) - console.log(file) + console.log(file); + try { + const style = fs.readFileSync(`${__dirname}/themes/${file}`, "utf8"); + armcord.addStyle(style) + } catch (err) { + console.error(err); + } }); +}) From 8d3b5f523adb7986014a4a599e7b0917686097a1 Mon Sep 17 00:00:00 2001 From: smartfridge <37928912+smartfrigde@users.noreply.github.com> Date: Fri, 14 May 2021 21:47:01 +0200 Subject: [PATCH 09/19] i have no idea what i am doing --- preload.js | 2 +- theme.html | 122 +++++++++++++++++------------------ utils/theme.js | 63 +++++++++++++++--- utils/themes/revertBrand.css | 8 +++ 4 files changed, 121 insertions(+), 74 deletions(-) diff --git a/preload.js b/preload.js index 80e8eb5..6f4238e 100644 --- a/preload.js +++ b/preload.js @@ -23,7 +23,7 @@ window.addEventListener("DOMContentLoaded", () => { window.location.href = "https://discord.com/invite/F25bc4RYDt"; }); electronLocalshortcut.register(currentWindow, "F3", () => { - window.location.href = "./theme.html"; + window.location.href = __dirname + "/theme.html"; }); require("./utils/capturer.js"); diff --git a/theme.html b/theme.html index 569d7dd..6533388 100644 --- a/theme.html +++ b/theme.html @@ -1,75 +1,71 @@ + + + ArmCord Theme Manager + + - .container { - position: fixed; - top: 50%; - left: 50%; - color: #fff; - transform: translate(-50%, -50%); - } - - - - - - - - - \ No newline at end of file + + +
+ + diff --git a/utils/theme.js b/utils/theme.js index d5605e6..9097ac7 100644 --- a/utils/theme.js +++ b/utils/theme.js @@ -1,14 +1,57 @@ const themeFolder = __dirname + "/themes/"; const fs = require("fs"); -const armcord = require("./armcord.js") -window.addEventListener("DOMContentLoaded", () => { -fs.readdirSync(themeFolder).forEach((file) => { - console.log(file); - try { - const style = fs.readFileSync(`${__dirname}/themes/${file}`, "utf8"); - armcord.addStyle(style) - } catch (err) { - console.error(err); +const armcord = require("./armcord.js"); +const splitRegex = /[^\S\r\n]*?\r?(?:\r\n|\n)[^\S\r\n]*?\*[^\S\r\n]?/; +const escapedAtRegex = /^\\@/; +function parseMeta(fileContent) { + //https://github.com/rauenzi/BetterDiscordApp/blob/01941c1178c13e1229e39e1f1434678a39a020b8/renderer/src/modules/addonmanager.js + const block = fileContent.split("/**", 2)[1].split("*/", 1)[0]; + const out = {}; + let field = ""; + let accum = ""; + for (const line of block.split(splitRegex)) { + if (line.length === 0) continue; + if (line.charAt(0) === "@" && line.charAt(1) !== " ") { + out[field] = accum; + const l = line.indexOf(" "); + field = line.substr(1, l - 1); + accum = line.substr(l + 1); + } else { + accum += " " + line.replace("\\n", "\n").replace(escapedAtRegex, "@"); + } } + out[field] = accum.trim(); + delete out[""]; + out.format = "jsdoc"; + return out; +} +function loadPluginMenu() { + window.addEventListener("DOMContentLoaded", () => { + fs.readdirSync(themeFolder).forEach((file) => { + console.log(file); + try { + const style = fs.readFileSync(`${__dirname}/themes/${file}`, "utf8"); + document.getElementById("tm-list").appendChild( + ` +

${parseMeta(style)}

+ ` + ); + } catch (err) { + console.error(err); + } + }); + }); +} + +window.addEventListener("DOMContentLoaded", () => { + loadPluginMenu() + fs.readdirSync(themeFolder).forEach((file) => { + console.log(file); + try { + const style = fs.readFileSync(`${__dirname}/themes/${file}`, "utf8"); + armcord.addStyle(style); + } catch (err) { + console.error(err); + } + }); }); -}) diff --git a/utils/themes/revertBrand.css b/utils/themes/revertBrand.css index 104ae18..c342047 100644 --- a/utils/themes/revertBrand.css +++ b/utils/themes/revertBrand.css @@ -1 +1,9 @@ +/** + * @name Revert Rebrand + * @author GooseNest + * @description Reverts Discord's 2021 rebrand (font, colors, reactions, mentions, loading screen, home icon, reply ping color, and more) + * @invite neMncS2 + * @version 3.0 +*/ + @import url('https://Goose-Nest.github.io/GT-RevertRebrand/src/main.css'); \ No newline at end of file From 6232c01006b4b87b5f8255e471ffd6b3b592274d Mon Sep 17 00:00:00 2001 From: smartfridge <37928912+smartfrigde@users.noreply.github.com> Date: Fri, 14 May 2021 22:54:40 +0200 Subject: [PATCH 10/19] Partial Powercord Theme Support --- utils/theme.js | 54 +--- utils/themes/GT-RevertRebrand-main/LICENSE | 21 ++ utils/themes/GT-RevertRebrand-main/README.md | 12 + .../RevertRebrand.theme.css} | 0 .../assets/authorized_apps_checkmark_icon.svg | 6 + .../assets/call_icon.svg | 3 + .../assets/mfa_lock_icon.svg | 11 + .../assets/server_join_icon.svg | 6 + .../themes/GT-RevertRebrand-main/gnTheme.mjs | 6 + .../GT-RevertRebrand-main/manifest.json | 8 + .../powercord_manifest.json | 8 + .../src/components/mentions.css | 14 + .../src/components/reactions.css | 39 +++ .../GT-RevertRebrand-main/src/general/bd.css | 4 + .../src/general/inputs.css | 48 ++++ .../src/general/other.css | 50 ++++ .../src/general/svgs.css | 25 ++ .../themes/GT-RevertRebrand-main/src/main.css | 249 ++++++++++++++++++ .../GT-RevertRebrand-main/src/main.scss | 11 + .../GT-RevertRebrand-main/src/variables.css | 66 +++++ 20 files changed, 595 insertions(+), 46 deletions(-) create mode 100644 utils/themes/GT-RevertRebrand-main/LICENSE create mode 100644 utils/themes/GT-RevertRebrand-main/README.md rename utils/themes/{revertBrand.css => GT-RevertRebrand-main/RevertRebrand.theme.css} (100%) create mode 100644 utils/themes/GT-RevertRebrand-main/assets/authorized_apps_checkmark_icon.svg create mode 100644 utils/themes/GT-RevertRebrand-main/assets/call_icon.svg create mode 100644 utils/themes/GT-RevertRebrand-main/assets/mfa_lock_icon.svg create mode 100644 utils/themes/GT-RevertRebrand-main/assets/server_join_icon.svg create mode 100644 utils/themes/GT-RevertRebrand-main/gnTheme.mjs create mode 100644 utils/themes/GT-RevertRebrand-main/manifest.json create mode 100644 utils/themes/GT-RevertRebrand-main/powercord_manifest.json create mode 100644 utils/themes/GT-RevertRebrand-main/src/components/mentions.css create mode 100644 utils/themes/GT-RevertRebrand-main/src/components/reactions.css create mode 100644 utils/themes/GT-RevertRebrand-main/src/general/bd.css create mode 100644 utils/themes/GT-RevertRebrand-main/src/general/inputs.css create mode 100644 utils/themes/GT-RevertRebrand-main/src/general/other.css create mode 100644 utils/themes/GT-RevertRebrand-main/src/general/svgs.css create mode 100644 utils/themes/GT-RevertRebrand-main/src/main.css create mode 100644 utils/themes/GT-RevertRebrand-main/src/main.scss create mode 100644 utils/themes/GT-RevertRebrand-main/src/variables.css diff --git a/utils/theme.js b/utils/theme.js index 9097ac7..825f674 100644 --- a/utils/theme.js +++ b/utils/theme.js @@ -1,55 +1,17 @@ -const themeFolder = __dirname + "/themes/"; const fs = require("fs"); const armcord = require("./armcord.js"); -const splitRegex = /[^\S\r\n]*?\r?(?:\r\n|\n)[^\S\r\n]*?\*[^\S\r\n]?/; -const escapedAtRegex = /^\\@/; -function parseMeta(fileContent) { - //https://github.com/rauenzi/BetterDiscordApp/blob/01941c1178c13e1229e39e1f1434678a39a020b8/renderer/src/modules/addonmanager.js - const block = fileContent.split("/**", 2)[1].split("*/", 1)[0]; - const out = {}; - let field = ""; - let accum = ""; - for (const line of block.split(splitRegex)) { - if (line.length === 0) continue; - if (line.charAt(0) === "@" && line.charAt(1) !== " ") { - out[field] = accum; - const l = line.indexOf(" "); - field = line.substr(1, l - 1); - accum = line.substr(l + 1); - } else { - accum += " " + line.replace("\\n", "\n").replace(escapedAtRegex, "@"); - } - } - out[field] = accum.trim(); - delete out[""]; - out.format = "jsdoc"; - return out; -} -function loadPluginMenu() { - window.addEventListener("DOMContentLoaded", () => { - fs.readdirSync(themeFolder).forEach((file) => { - console.log(file); - try { - const style = fs.readFileSync(`${__dirname}/themes/${file}`, "utf8"); - document.getElementById("tm-list").appendChild( - ` -

${parseMeta(style)}

- ` - ); - } catch (err) { - console.error(err); - } - }); - }); -} - +const themeFolder = __dirname + "/themes/"; window.addEventListener("DOMContentLoaded", () => { - loadPluginMenu() fs.readdirSync(themeFolder).forEach((file) => { console.log(file); try { - const style = fs.readFileSync(`${__dirname}/themes/${file}`, "utf8"); - armcord.addStyle(style); + const manifest = fs.readFileSync(`${__dirname}/themes/${file}/manifest.json`, "utf8"); + var themeFile = JSON.parse(manifest); + console.log(themeFile.theme); + console.log(themeFile) + const theme = fs.readFileSync(`${__dirname}/themes/${file}/${themeFile.theme}`, "utf8"); + armcord.addStyle(theme) + console.log(`Loaded ${themeFile.name} made by ${themeFile.author}`); } catch (err) { console.error(err); } diff --git a/utils/themes/GT-RevertRebrand-main/LICENSE b/utils/themes/GT-RevertRebrand-main/LICENSE new file mode 100644 index 0000000..3cf6dad --- /dev/null +++ b/utils/themes/GT-RevertRebrand-main/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2021 GooseNest + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/utils/themes/GT-RevertRebrand-main/README.md b/utils/themes/GT-RevertRebrand-main/README.md new file mode 100644 index 0000000..e463215 --- /dev/null +++ b/utils/themes/GT-RevertRebrand-main/README.md @@ -0,0 +1,12 @@ +# GT-RevertRebrand + +Reverts Discord's 2021 rebrand (font, colors, reactions, mentions, loading screen, home icon, reply ping color, and more) + +## Mods Supported + +- Powercord +- BetterDiscord +- Vizality + +## Screenshots + diff --git a/utils/themes/revertBrand.css b/utils/themes/GT-RevertRebrand-main/RevertRebrand.theme.css similarity index 100% rename from utils/themes/revertBrand.css rename to utils/themes/GT-RevertRebrand-main/RevertRebrand.theme.css diff --git a/utils/themes/GT-RevertRebrand-main/assets/authorized_apps_checkmark_icon.svg b/utils/themes/GT-RevertRebrand-main/assets/authorized_apps_checkmark_icon.svg new file mode 100644 index 0000000..c379d0e --- /dev/null +++ b/utils/themes/GT-RevertRebrand-main/assets/authorized_apps_checkmark_icon.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/utils/themes/GT-RevertRebrand-main/assets/call_icon.svg b/utils/themes/GT-RevertRebrand-main/assets/call_icon.svg new file mode 100644 index 0000000..63cbd39 --- /dev/null +++ b/utils/themes/GT-RevertRebrand-main/assets/call_icon.svg @@ -0,0 +1,3 @@ + + + diff --git a/utils/themes/GT-RevertRebrand-main/assets/mfa_lock_icon.svg b/utils/themes/GT-RevertRebrand-main/assets/mfa_lock_icon.svg new file mode 100644 index 0000000..67d2121 --- /dev/null +++ b/utils/themes/GT-RevertRebrand-main/assets/mfa_lock_icon.svg @@ -0,0 +1,11 @@ + + + icon-green-lock + Created with Sketch. + + + + + + + diff --git a/utils/themes/GT-RevertRebrand-main/assets/server_join_icon.svg b/utils/themes/GT-RevertRebrand-main/assets/server_join_icon.svg new file mode 100644 index 0000000..419984e --- /dev/null +++ b/utils/themes/GT-RevertRebrand-main/assets/server_join_icon.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/utils/themes/GT-RevertRebrand-main/gnTheme.mjs b/utils/themes/GT-RevertRebrand-main/gnTheme.mjs new file mode 100644 index 0000000..0661ae4 --- /dev/null +++ b/utils/themes/GT-RevertRebrand-main/gnTheme.mjs @@ -0,0 +1,6 @@ +export default { + name: 'Revert Rebrand', + description: 'Reverts Discord\'s 2021 rebrand (font, colors, reactions, mentions, loading screen, home icon, reply ping color, and more)', + version: '3.0', + screenshots: [] +}; diff --git a/utils/themes/GT-RevertRebrand-main/manifest.json b/utils/themes/GT-RevertRebrand-main/manifest.json new file mode 100644 index 0000000..c464284 --- /dev/null +++ b/utils/themes/GT-RevertRebrand-main/manifest.json @@ -0,0 +1,8 @@ +{ + "name": "Revert Rebrand", + "description": "Reverts Discord's 2021 rebrand (font, colors, reactions, mentions, loading screen, home icon, reply ping color, and more)", + "version": "3.0", + "author": "GooseNest", + "license": "MIT", + "theme": "src/main.scss" +} \ No newline at end of file diff --git a/utils/themes/GT-RevertRebrand-main/powercord_manifest.json b/utils/themes/GT-RevertRebrand-main/powercord_manifest.json new file mode 100644 index 0000000..c464284 --- /dev/null +++ b/utils/themes/GT-RevertRebrand-main/powercord_manifest.json @@ -0,0 +1,8 @@ +{ + "name": "Revert Rebrand", + "description": "Reverts Discord's 2021 rebrand (font, colors, reactions, mentions, loading screen, home icon, reply ping color, and more)", + "version": "3.0", + "author": "GooseNest", + "license": "MIT", + "theme": "src/main.scss" +} \ No newline at end of file diff --git a/utils/themes/GT-RevertRebrand-main/src/components/mentions.css b/utils/themes/GT-RevertRebrand-main/src/components/mentions.css new file mode 100644 index 0000000..55b6071 --- /dev/null +++ b/utils/themes/GT-RevertRebrand-main/src/components/mentions.css @@ -0,0 +1,14 @@ +/* Revert mentions and channel links */ +#app-mount .wrapper-3WhCwL { + color: var(--brand-experiment-400); + background: var(--brand-experiment-10a); +} + +#app-mount .wrapper-3WhCwL:hover { + background: var(--brand-experiment-25a); +} + +/* Hide semi-transparent background if mentioned in message */ +/* .mentioned-xhSam7 .mention { + background: transparent !important; +} */ \ No newline at end of file diff --git a/utils/themes/GT-RevertRebrand-main/src/components/reactions.css b/utils/themes/GT-RevertRebrand-main/src/components/reactions.css new file mode 100644 index 0000000..112f25c --- /dev/null +++ b/utils/themes/GT-RevertRebrand-main/src/components/reactions.css @@ -0,0 +1,39 @@ +/* Revert reactions */ +.reaction-1hd86g { + border-radius: .25rem; + background: var(--background-modifier-selected); + + border-color: transparent !important; + + margin-right: 3px; +} + +.reaction-1hd86g .reactionCount-2mvXRV { + color: var(--text-muted); /* A11Y-- */ +} + +.reaction-1hd86g .reactionInner-15NvIl { + padding: 0 4.5px; +} + +/* Self reactions */ +.reaction-1hd86g.reactionMe-wv5HKu .reactionCount-2mvXRV { + color: var(--brand-experiment); /* A11Y-- */ +} + +.reaction-1hd86g.reactionMe-wv5HKu { + background-color: var(--brand-experiment-30a); +} + +/* Reaction hover */ +.reaction-1hd86g:hover .reactionCount-2mvXRV { + color: var(--interactive-active) !important; +} + +.reaction-1hd86g:hover { + background-color: var(--background-modifier-selected); +} + +.reaction-1hd86g.reactionMe-wv5HKu:hover { + background-color: var(--brand-experiment-40a); +} \ No newline at end of file diff --git a/utils/themes/GT-RevertRebrand-main/src/general/bd.css b/utils/themes/GT-RevertRebrand-main/src/general/bd.css new file mode 100644 index 0000000..00a66a0 --- /dev/null +++ b/utils/themes/GT-RevertRebrand-main/src/general/bd.css @@ -0,0 +1,4 @@ +/* Color BD specific settings elements */ +.bd-addon-views .bd-view-button.selected, .bd-button { + background-color: var(--brand-experiment); +} \ No newline at end of file diff --git a/utils/themes/GT-RevertRebrand-main/src/general/inputs.css b/utils/themes/GT-RevertRebrand-main/src/general/inputs.css new file mode 100644 index 0000000..be56f71 --- /dev/null +++ b/utils/themes/GT-RevertRebrand-main/src/general/inputs.css @@ -0,0 +1,48 @@ +/* Restyle the create server and discovery buttons to the old green */ +.circleIconButton-1QV--U.circleButtonBase-2DCxIZ { + color: var(--old-green); +} +.circleIconButton-1QV--U.circleButtonBase-2DCxIZ.selected-1JjBPm { + color: white; + background-color: var(--old-green); +} + +/* On switches to old green */ +.container-3auIfb[style="opacity: 1; background-color: rgb(59, 165, 92);"] { + background-color: var(--old-green) !important; +} + +/* Text input focus border color is now focus / link, change back to original brand color */ +.input-cIJ7To.focused-1mmYsC, .input-cIJ7To:focus { + border-color: var(--brand-experiment); +} + +/* Restyle the create server and discovery buttons to the old green */ +.circleIconButton-1QV--U.circleButtonBase-2DCxIZ { + color: var(--old-green); +} +.circleIconButton-1QV--U.circleButtonBase-2DCxIZ.selected-1JjBPm { + color: white; + background-color: var(--old-green); +} + +/* On switches to old green */ +.container-3auIfb[style="opacity: 1; background-color: rgb(59, 165, 92);"] { + background-color: var(--old-green) !important; +} + +/* Text input focus border color is now focus / link, change back to original brand color */ +.input-cIJ7To.focused-1mmYsC, .input-cIJ7To:focus { + border-color: var(--brand-experiment); +} + +/* Change all radio bars with the new green to the old green */ +/* In particular, this fixes the privacy and safety settings' 'keep me safe' option */ +.radioBar-bMNUI-[style*="--radio-bar-accent-color:#3ba55c"] { + --radio-bar-accent-color: var(--old-green) !important; +} + +/* Revert ping mention button being link colored (used to be brand) */ +.colorLink-2vG20E.size14-e6ZScH.mentionButton-3710-W { + color: var(--brand-experiment) !important; +} \ No newline at end of file diff --git a/utils/themes/GT-RevertRebrand-main/src/general/other.css b/utils/themes/GT-RevertRebrand-main/src/general/other.css new file mode 100644 index 0000000..292c5cb --- /dev/null +++ b/utils/themes/GT-RevertRebrand-main/src/general/other.css @@ -0,0 +1,50 @@ +/* Change green colorables from the new green color to the old green color. */ +/* In particular, this fixes the join call buttons, but it may also fix other stuff around the app */ +.colorable-1bkp8v.green-plH-Mj { + background-color: var(--old-green); +} + +/* Verified check mark color */ +.verified-1eC5dy { + color: var(--old-green); +} + +/* Fix the speaking ring around your avatar in the bottom left corner of your screen */ +.avatarSpeaking-2c8-9i { + box-shadow: inset 0 0 0 2px var(--old-green), inset 0 0 0 3px #2f3136; +} + +/* And fix speaking avatars in calls in general */ +.speaking-B2MXPi.border-Jn5IOt { + box-shadow: inset 0 0 0 2px var(--old-green), inset 0 0 0 3px #2f3136; +} + +/* Revert new Nitro icon by setting item */ +.premiumTabItem-1QTfBr .icon-Zc-uZZ { + display: none; +} + +/* Online status */ +.wrapper-3t9DeA rect.pointerEvents-2zdfdO[mask="url(#svg-mask-status-online)"]:not([fill="#ffffff"]) { + fill: var(--old-green); +} + +/* Online status (mobile) */ +.wrapper-3t9DeA rect.pointerEvents-2zdfdO[mask="url(#svg-mask-status-online-mobile)"]:not([fill="#ffffff"]) { + fill: var(--old-green); +} + +/* Online status (typing and other) */ +.wrapper-3t9DeA svg.cursorDefault-dsQJ1n > rect[fill="#3ba55c"] { + fill: var(--old-green); +} + +/* Revert loading tip title color */ +.tipTitle-GL9qAt { + color: var(--brand-experiment) !important; +} + +/* Revert home icon */ +.homeIcon-FuNwkv > path { + d: path("M 20.6644 20 C 20.6644 20 19.8014 18.9762 19.0822 18.0714 C 22.2226 17.1905 23.4212 15.2381 23.4212 15.2381 C 22.4384 15.881 21.5034 16.3334 20.6644 16.6429 C 19.4658 17.1429 18.3151 17.4762 17.1884 17.6667 C 14.887 18.0953 12.7774 17.9762 10.9795 17.6429 C 9.61301 17.381 8.43836 17 7.45548 16.6191 C 6.90411 16.4048 6.30479 16.1429 5.70548 15.8096 C 5.63356 15.7619 5.56164 15.7381 5.48973 15.6905 C 5.44178 15.6667 5.41781 15.6429 5.39384 15.6191 C 4.96233 15.381 4.7226 15.2143 4.7226 15.2143 C 4.7226 15.2143 5.87329 17.1191 8.91781 18.0238 C 8.19863 18.9286 7.31164 20 7.31164 20 C 2.0137 19.8333 0 16.381 0 16.381 C 0 8.7144 3.45205 2.50017 3.45205 2.50017 C 6.90411 -0.07123 10.1884 0.000197861 10.1884 0.000197861 L 10.4281 0.285909 C 6.11301 1.52399 4.12329 3.40493 4.12329 3.40493 C 4.12329 3.40493 4.65068 3.11921 5.53767 2.71446 C 8.10274 1.59542 10.1404 1.2859 10.9795 1.21447 C 11.1233 1.19066 11.2432 1.16685 11.387 1.16685 C 12.8493 0.976379 14.5034 0.92876 16.2295 1.11923 C 18.5068 1.38114 20.9521 2.0478 23.4452 3.40493 C 23.4452 3.40493 21.5514 1.61923 17.476 0.381146 L 17.8116 0.000197861 C 17.8116 0.000197861 21.0959 -0.07123 24.5479 2.50017 C 24.5479 2.50017 28 8.7144 28 16.381 C 28 16.381 25.9623 19.8333 20.6644 20 Z M 9.51712 8.88106 C 8.15068 8.88106 7.07192 10.0715 7.07192 11.5239 C 7.07192 12.9763 8.17466 14.1667 9.51712 14.1667 C 10.8836 14.1667 11.9623 12.9763 11.9623 11.5239 C 11.9863 10.0715 10.8836 8.88106 9.51712 8.88106 Z M 18.2671 8.88106 C 16.9007 8.88106 15.8219 10.0715 15.8219 11.5239 C 15.8219 12.9763 16.9247 14.1667 18.2671 14.1667 C 19.6336 14.1667 20.7123 12.9763 20.7123 11.5239 C 20.7123 10.0715 19.6336 8.88106 18.2671 8.88106 Z"); +} \ No newline at end of file diff --git a/utils/themes/GT-RevertRebrand-main/src/general/svgs.css b/utils/themes/GT-RevertRebrand-main/src/general/svgs.css new file mode 100644 index 0000000..279f5a8 --- /dev/null +++ b/utils/themes/GT-RevertRebrand-main/src/general/svgs.css @@ -0,0 +1,25 @@ +/* Fix misc SVGs that for some reason sometimes weren't targeted by the previous rules (particularly presence SVGs) */ +*[fill="#3ba55c"] { + fill: var(--old-green); +} + +/* Fix the call icons in chat */ +.icon-2Po-VO.iconSize-2tmqqh[style='background-image: url("/assets/7f75ab26bc5deb393cd8db44d9fe14e7.svg");'] { + background-image: url("https://Goose-Nest.github.io/GT-RevertRebrand/assets/call_icon.svg") !important; +} + +/* Server join icon to old green (arrow left to join system message) */ +.icon-2Po-VO.iconSize-2tmqqh[style='background-image: url("/assets/e06a573355c490f7ce6e3125ac01db81.svg");'] { + background-image: url("https://Goose-Nest.github.io/GT-RevertRebrand/assets/server_join_icon.svg") !important; +} + +/* Change the lock icon in the settings, it's an img tag so we need to use the content: css attribute instead of background-image */ +.lockIcon-2Hj8Tq[src="/assets/acea8fd38500a12d0509c027a274caaa.svg"] { + content: url("https://Goose-Nest.github.io/GT-RevertRebrand/assets/mfa_lock_icon.svg") !important; +} + +/* Permission checkmarks in authorized apps to the old green */ +/* The images in these are specified by class, so it's impossible to get more specific of a match than this */ +.permissionCheckmark-1SeKr2 { + background: url("https://Goose-Nest.github.io/GT-RevertRebrand/assets/authorized_apps_checkmark_icon.svg") no-repeat; +} \ No newline at end of file diff --git a/utils/themes/GT-RevertRebrand-main/src/main.css b/utils/themes/GT-RevertRebrand-main/src/main.css new file mode 100644 index 0000000..6bb8149 --- /dev/null +++ b/utils/themes/GT-RevertRebrand-main/src/main.css @@ -0,0 +1,249 @@ +body { + /* Revert new green to old color */ + --old-green: #43b581; + --info-positive-foreground: var(--old-green); + --status-positive-background: var(--old-green); + --text-positive: var(--old-green); + /* Revert new red to old color */ + --old-red: #f04747; + --text-danger: var(--old-red); + --info-danger-foreground: var(--old-red); + --status-danger-background: var(--old-red); + /* Revert to old font var */ + --font-display: var(--font-primary); + /* Found in Discord's CSS file: oldBrand vs newBrand HTML class - here we force old brand vars via copying */ + --brand-experiment-100: #f8f9fd; + --brand-experiment-130: #f2f4fc; + --brand-experiment-160: #ebeefa; + --brand-experiment-200: #e3e7f8; + --brand-experiment-230: #dae0f5; + --brand-experiment-260: #d1d9f3; + --brand-experiment-300: #c7d0f0; + --brand-experiment-330: #b5c1ec; + --brand-experiment-360: #a5b3e7; + --brand-experiment-400: #8ea1e1; + --brand-experiment-430: #869adf; + --brand-experiment-460: #7d92dd; + --brand-experiment: #7289da; + --brand-experiment-500: #7289da; + --brand-experiment-530: #687dc6; + --brand-experiment-560: #5c6fb1; + --brand-experiment-600: #4e5d94; + --brand-experiment-630: #435180; + --brand-experiment-660: #3b4770; + --brand-experiment-700: #2e3757; + --brand-experiment-730: #2b3352; + --brand-experiment-760: #272f4b; + --brand-experiment-800: #222941; + --brand-experiment-830: #1a2032; + --brand-experiment-860: #111521; + --brand-experiment-900: #06070b; + --brand-experiment-05a: rgba(114,137,218,0.05); + --brand-experiment-10a: rgba(114,137,218,0.1); + --brand-experiment-15a: rgba(114,137,218,0.15); + --brand-experiment-20a: rgba(114,137,218,0.2); + --brand-experiment-25a: rgba(114,137,218,0.25); + --brand-experiment-30a: rgba(114,137,218,0.3); + --brand-experiment-35a: rgba(114,137,218,0.35); + --brand-experiment-40a: rgba(114,137,218,0.4); + --brand-experiment-45a: rgba(114,137,218,0.45); + --brand-experiment-50a: rgba(114,137,218,0.5); + --brand-experiment-55a: rgba(114,137,218,0.55); + --brand-experiment-60a: rgba(114,137,218,0.6); + --brand-experiment-65a: rgba(114,137,218,0.65); + --brand-experiment-70a: rgba(114,137,218,0.7); + --brand-experiment-75a: rgba(114,137,218,0.75); + --brand-experiment-80a: rgba(114,137,218,0.8); + --brand-experiment-85a: rgba(114,137,218,0.85); + --brand-experiment-90a: rgba(114,137,218,0.9); + --brand-experiment-95a: rgba(114,137,218,0.95); +} + +/* Revert mentions and channel links */ +#app-mount .wrapper-3WhCwL { + color: var(--brand-experiment-400); + background: var(--brand-experiment-10a); +} + +#app-mount .wrapper-3WhCwL:hover { + background: var(--brand-experiment-25a); +} + +/* Hide semi-transparent background if mentioned in message */ +/* .mentioned-xhSam7 .mention { + background: transparent !important; +} */ +/* Revert reactions */ +.reaction-1hd86g { + border-radius: 0.25rem; + background: var(--background-modifier-selected); + border-color: transparent !important; + margin-right: 3px; +} + +.reaction-1hd86g .reactionCount-2mvXRV { + color: var(--text-muted); + /* A11Y-- */ +} + +.reaction-1hd86g .reactionInner-15NvIl { + padding: 0 4.5px; +} + +/* Self reactions */ +.reaction-1hd86g.reactionMe-wv5HKu .reactionCount-2mvXRV { + color: var(--brand-experiment); + /* A11Y-- */ +} + +.reaction-1hd86g.reactionMe-wv5HKu { + background-color: var(--brand-experiment-30a); +} + +/* Reaction hover */ +.reaction-1hd86g:hover .reactionCount-2mvXRV { + color: var(--interactive-active) !important; +} + +.reaction-1hd86g:hover { + background-color: var(--background-modifier-selected); +} + +.reaction-1hd86g.reactionMe-wv5HKu:hover { + background-color: var(--brand-experiment-40a); +} + +/* Color BD specific settings elements */ +.bd-addon-views .bd-view-button.selected, .bd-button { + background-color: var(--brand-experiment); +} + +/* Restyle the create server and discovery buttons to the old green */ +.circleIconButton-1QV--U.circleButtonBase-2DCxIZ { + color: var(--old-green); +} + +.circleIconButton-1QV--U.circleButtonBase-2DCxIZ.selected-1JjBPm { + color: white; + background-color: var(--old-green); +} + +/* On switches to old green */ +.container-3auIfb[style="opacity: 1; background-color: rgb(59, 165, 92);"] { + background-color: var(--old-green) !important; +} + +/* Text input focus border color is now focus / link, change back to original brand color */ +.input-cIJ7To.focused-1mmYsC, .input-cIJ7To:focus { + border-color: var(--brand-experiment); +} + +/* Restyle the create server and discovery buttons to the old green */ +.circleIconButton-1QV--U.circleButtonBase-2DCxIZ { + color: var(--old-green); +} + +.circleIconButton-1QV--U.circleButtonBase-2DCxIZ.selected-1JjBPm { + color: white; + background-color: var(--old-green); +} + +/* On switches to old green */ +.container-3auIfb[style="opacity: 1; background-color: rgb(59, 165, 92);"] { + background-color: var(--old-green) !important; +} + +/* Text input focus border color is now focus / link, change back to original brand color */ +.input-cIJ7To.focused-1mmYsC, .input-cIJ7To:focus { + border-color: var(--brand-experiment); +} + +/* Change all radio bars with the new green to the old green */ +/* In particular, this fixes the privacy and safety settings' 'keep me safe' option */ +.radioBar-bMNUI-[style*="--radio-bar-accent-color:#3ba55c"] { + --radio-bar-accent-color: var(--old-green) !important; +} + +/* Revert ping mention button being link colored (used to be brand) */ +.colorLink-2vG20E.size14-e6ZScH.mentionButton-3710-W { + color: var(--brand-experiment) !important; +} + +/* Fix misc SVGs that for some reason sometimes weren't targeted by the previous rules (particularly presence SVGs) */ +*[fill="#3ba55c"] { + fill: var(--old-green); +} + +/* Fix the call icons in chat */ +.icon-2Po-VO.iconSize-2tmqqh[style='background-image: url("/assets/7f75ab26bc5deb393cd8db44d9fe14e7.svg");'] { + background-image: url("https://Goose-Nest.github.io/GT-RevertRebrand/assets/call_icon.svg") !important; +} + +/* Server join icon to old green (arrow left to join system message) */ +.icon-2Po-VO.iconSize-2tmqqh[style='background-image: url("/assets/e06a573355c490f7ce6e3125ac01db81.svg");'] { + background-image: url("https://Goose-Nest.github.io/GT-RevertRebrand/assets/server_join_icon.svg") !important; +} + +/* Change the lock icon in the settings, it's an img tag so we need to use the content: css attribute instead of background-image */ +.lockIcon-2Hj8Tq[src="/assets/acea8fd38500a12d0509c027a274caaa.svg"] { + content: url("https://Goose-Nest.github.io/GT-RevertRebrand/assets/mfa_lock_icon.svg") !important; +} + +/* Permission checkmarks in authorized apps to the old green */ +/* The images in these are specified by class, so it's impossible to get more specific of a match than this */ +.permissionCheckmark-1SeKr2 { + background: url("https://Goose-Nest.github.io/GT-RevertRebrand/assets/authorized_apps_checkmark_icon.svg") no-repeat; +} + +/* Change green colorables from the new green color to the old green color. */ +/* In particular, this fixes the join call buttons, but it may also fix other stuff around the app */ +.colorable-1bkp8v.green-plH-Mj { + background-color: var(--old-green); +} + +/* Verified check mark color */ +.verified-1eC5dy { + color: var(--old-green); +} + +/* Fix the speaking ring around your avatar in the bottom left corner of your screen */ +.avatarSpeaking-2c8-9i { + box-shadow: inset 0 0 0 2px var(--old-green), inset 0 0 0 3px #2f3136; +} + +/* And fix speaking avatars in calls in general */ +.speaking-B2MXPi.border-Jn5IOt { + box-shadow: inset 0 0 0 2px var(--old-green), inset 0 0 0 3px #2f3136; +} + +/* Revert new Nitro icon by setting item */ +.premiumTabItem-1QTfBr .icon-Zc-uZZ { + display: none; +} + +/* Online status */ +.wrapper-3t9DeA rect.pointerEvents-2zdfdO[mask="url(#svg-mask-status-online)"]:not([fill="#ffffff"]) { + fill: var(--old-green); +} + +/* Online status (mobile) */ +.wrapper-3t9DeA rect.pointerEvents-2zdfdO[mask="url(#svg-mask-status-online-mobile)"]:not([fill="#ffffff"]) { + fill: var(--old-green); +} + +/* Online status (typing and other) */ +.wrapper-3t9DeA svg.cursorDefault-dsQJ1n > rect[fill="#3ba55c"] { + fill: var(--old-green); +} + +/* Revert loading tip title color */ +.tipTitle-GL9qAt { + color: var(--brand-experiment) !important; +} + +/* Revert home icon */ +.homeIcon-FuNwkv > path { + d: path("M 20.6644 20 C 20.6644 20 19.8014 18.9762 19.0822 18.0714 C 22.2226 17.1905 23.4212 15.2381 23.4212 15.2381 C 22.4384 15.881 21.5034 16.3334 20.6644 16.6429 C 19.4658 17.1429 18.3151 17.4762 17.1884 17.6667 C 14.887 18.0953 12.7774 17.9762 10.9795 17.6429 C 9.61301 17.381 8.43836 17 7.45548 16.6191 C 6.90411 16.4048 6.30479 16.1429 5.70548 15.8096 C 5.63356 15.7619 5.56164 15.7381 5.48973 15.6905 C 5.44178 15.6667 5.41781 15.6429 5.39384 15.6191 C 4.96233 15.381 4.7226 15.2143 4.7226 15.2143 C 4.7226 15.2143 5.87329 17.1191 8.91781 18.0238 C 8.19863 18.9286 7.31164 20 7.31164 20 C 2.0137 19.8333 0 16.381 0 16.381 C 0 8.7144 3.45205 2.50017 3.45205 2.50017 C 6.90411 -0.07123 10.1884 0.000197861 10.1884 0.000197861 L 10.4281 0.285909 C 6.11301 1.52399 4.12329 3.40493 4.12329 3.40493 C 4.12329 3.40493 4.65068 3.11921 5.53767 2.71446 C 8.10274 1.59542 10.1404 1.2859 10.9795 1.21447 C 11.1233 1.19066 11.2432 1.16685 11.387 1.16685 C 12.8493 0.976379 14.5034 0.92876 16.2295 1.11923 C 18.5068 1.38114 20.9521 2.0478 23.4452 3.40493 C 23.4452 3.40493 21.5514 1.61923 17.476 0.381146 L 17.8116 0.000197861 C 17.8116 0.000197861 21.0959 -0.07123 24.5479 2.50017 C 24.5479 2.50017 28 8.7144 28 16.381 C 28 16.381 25.9623 19.8333 20.6644 20 Z M 9.51712 8.88106 C 8.15068 8.88106 7.07192 10.0715 7.07192 11.5239 C 7.07192 12.9763 8.17466 14.1667 9.51712 14.1667 C 10.8836 14.1667 11.9623 12.9763 11.9623 11.5239 C 11.9863 10.0715 10.8836 8.88106 9.51712 8.88106 Z M 18.2671 8.88106 C 16.9007 8.88106 15.8219 10.0715 15.8219 11.5239 C 15.8219 12.9763 16.9247 14.1667 18.2671 14.1667 C 19.6336 14.1667 20.7123 12.9763 20.7123 11.5239 C 20.7123 10.0715 19.6336 8.88106 18.2671 8.88106 Z"); +} + +/* Import all the CSS files */ \ No newline at end of file diff --git a/utils/themes/GT-RevertRebrand-main/src/main.scss b/utils/themes/GT-RevertRebrand-main/src/main.scss new file mode 100644 index 0000000..fcefb7c --- /dev/null +++ b/utils/themes/GT-RevertRebrand-main/src/main.scss @@ -0,0 +1,11 @@ +/* Import all the CSS files */ + +@use "variables"; + +@use "components/mentions"; +@use "components/reactions"; + +@use "general/bd"; +@use "general/inputs"; +@use "general/svgs"; +@use "general/other"; \ No newline at end of file diff --git a/utils/themes/GT-RevertRebrand-main/src/variables.css b/utils/themes/GT-RevertRebrand-main/src/variables.css new file mode 100644 index 0000000..24e4a46 --- /dev/null +++ b/utils/themes/GT-RevertRebrand-main/src/variables.css @@ -0,0 +1,66 @@ +body { + /* Revert new green to old color */ + --old-green: #43b581; + --info-positive-foreground: var(--old-green); + --status-positive-background: var(--old-green); + --text-positive: var(--old-green); + + /* Revert new red to old color */ + --old-red: #f04747; + --text-danger: var(--old-red); + --info-danger-foreground: var(--old-red); + --status-danger-background: var(--old-red); + + /* Revert to old font var */ + --font-display: var(--font-primary); + + /* Found in Discord's CSS file: oldBrand vs newBrand HTML class - here we force old brand vars via copying */ + --brand-experiment-100: #f8f9fd; + --brand-experiment-130: #f2f4fc; + --brand-experiment-160: #ebeefa; + --brand-experiment-200: #e3e7f8; + --brand-experiment-230: #dae0f5; + --brand-experiment-260: #d1d9f3; + --brand-experiment-300: #c7d0f0; + --brand-experiment-330: #b5c1ec; + --brand-experiment-360: #a5b3e7; + --brand-experiment-400: #8ea1e1; + --brand-experiment-430: #869adf; + --brand-experiment-460: #7d92dd; + + --brand-experiment: #7289da; + + --brand-experiment-500: #7289da; + --brand-experiment-530: #687dc6; + --brand-experiment-560: #5c6fb1; + --brand-experiment-600: #4e5d94; + --brand-experiment-630: #435180; + --brand-experiment-660: #3b4770; + --brand-experiment-700: #2e3757; + --brand-experiment-730: #2b3352; + --brand-experiment-760: #272f4b; + --brand-experiment-800: #222941; + --brand-experiment-830: #1a2032; + --brand-experiment-860: #111521; + --brand-experiment-900: #06070b; + + --brand-experiment-05a: rgba(114,137,218,0.05); + --brand-experiment-10a: rgba(114,137,218,0.1); + --brand-experiment-15a: rgba(114,137,218,0.15); + --brand-experiment-20a: rgba(114,137,218,0.2); + --brand-experiment-25a: rgba(114,137,218,0.25); + --brand-experiment-30a: rgba(114,137,218,0.3); + --brand-experiment-35a: rgba(114,137,218,0.35); + --brand-experiment-40a: rgba(114,137,218,0.4); + --brand-experiment-45a: rgba(114,137,218,0.45); + --brand-experiment-50a: rgba(114,137,218,0.5); + --brand-experiment-55a: rgba(114,137,218,0.55); + --brand-experiment-60a: rgba(114,137,218,0.6); + --brand-experiment-65a: rgba(114,137,218,0.65); + --brand-experiment-70a: rgba(114,137,218,0.7); + --brand-experiment-75a: rgba(114,137,218,0.75); + --brand-experiment-80a: rgba(114,137,218,0.8); + --brand-experiment-85a: rgba(114,137,218,0.85); + --brand-experiment-90a: rgba(114,137,218,0.9); + --brand-experiment-95a: rgba(114,137,218,0.95); +} \ No newline at end of file From 45d8b89c9e309759d20b35937d31c688d308828b Mon Sep 17 00:00:00 2001 From: smartfridge <37928912+smartfrigde@users.noreply.github.com> Date: Sat, 15 May 2021 12:35:22 +0200 Subject: [PATCH 11/19] Some tweaks to theme loading --- utils/theme.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utils/theme.js b/utils/theme.js index 825f674..dc92b95 100644 --- a/utils/theme.js +++ b/utils/theme.js @@ -10,8 +10,8 @@ window.addEventListener("DOMContentLoaded", () => { console.log(themeFile.theme); console.log(themeFile) const theme = fs.readFileSync(`${__dirname}/themes/${file}/${themeFile.theme}`, "utf8"); - armcord.addStyle(theme) - console.log(`Loaded ${themeFile.name} made by ${themeFile.author}`); + armcord.addStyle(theme); + console.log(`%cLoaded ${themeFile.name} made by ${themeFile.author}`, "color:red"); } catch (err) { console.error(err); } From f03642e51efed0fe672baa942df75730ca4768c9 Mon Sep 17 00:00:00 2001 From: smartfridge <37928912+smartfrigde@users.noreply.github.com> Date: Sat, 15 May 2021 12:53:27 +0200 Subject: [PATCH 12/19] Themes loading tweaks + Revert Brand ported theme --- preload.js | 7 +- utils/themes/GT-RevertRebrand-main/README.md | 11 +- .../assets/authorized_apps_checkmark_icon.svg | 6 - .../assets/call_icon.svg | 3 - .../assets/mfa_lock_icon.svg | 11 - .../assets/server_join_icon.svg | 6 - .../themes/GT-RevertRebrand-main/gnTheme.mjs | 6 - .../GT-RevertRebrand-main/manifest.json | 2 +- .../powercord_manifest.json | 8 - .../src/components/mentions.css | 14 - .../src/components/reactions.css | 39 --- .../GT-RevertRebrand-main/src/general/bd.css | 4 - .../src/general/inputs.css | 48 ---- .../src/general/other.css | 50 ---- .../src/general/svgs.css | 25 -- .../themes/GT-RevertRebrand-main/src/main.css | 249 ------------------ .../GT-RevertRebrand-main/src/main.scss | 11 - .../GT-RevertRebrand-main/src/variables.css | 66 ----- 18 files changed, 7 insertions(+), 559 deletions(-) delete mode 100644 utils/themes/GT-RevertRebrand-main/assets/authorized_apps_checkmark_icon.svg delete mode 100644 utils/themes/GT-RevertRebrand-main/assets/call_icon.svg delete mode 100644 utils/themes/GT-RevertRebrand-main/assets/mfa_lock_icon.svg delete mode 100644 utils/themes/GT-RevertRebrand-main/assets/server_join_icon.svg delete mode 100644 utils/themes/GT-RevertRebrand-main/gnTheme.mjs delete mode 100644 utils/themes/GT-RevertRebrand-main/powercord_manifest.json delete mode 100644 utils/themes/GT-RevertRebrand-main/src/components/mentions.css delete mode 100644 utils/themes/GT-RevertRebrand-main/src/components/reactions.css delete mode 100644 utils/themes/GT-RevertRebrand-main/src/general/bd.css delete mode 100644 utils/themes/GT-RevertRebrand-main/src/general/inputs.css delete mode 100644 utils/themes/GT-RevertRebrand-main/src/general/other.css delete mode 100644 utils/themes/GT-RevertRebrand-main/src/general/svgs.css delete mode 100644 utils/themes/GT-RevertRebrand-main/src/main.css delete mode 100644 utils/themes/GT-RevertRebrand-main/src/main.scss delete mode 100644 utils/themes/GT-RevertRebrand-main/src/variables.css diff --git a/preload.js b/preload.js index 6f4238e..2966446 100644 --- a/preload.js +++ b/preload.js @@ -23,10 +23,13 @@ window.addEventListener("DOMContentLoaded", () => { window.location.href = "https://discord.com/invite/F25bc4RYDt"; }); electronLocalshortcut.register(currentWindow, "F3", () => { - window.location.href = __dirname + "/theme.html"; + currentWindow.loadFile('theme.html') }); require("./utils/capturer.js"); - + console.log( + "%c ArmCord", + "font-weight: bold; font-size: 50px;color: red; text-shadow: 3px 3px 0 rgb(217,31,38) , 6px 6px 0 rgb(226,91,14) , 9px 9px 0 rgb(245,221,8) , 12px 12px 0 rgb(5,148,68) , 15px 15px 0 rgb(2,135,206) , 18px 18px 0 rgb(4,77,145) , 21px 21px 0 rgb(42,21,113)" + ); ArmCord.addStyle(` @import url("https://kckarnige.github.io/femboi_owo/discord-font.css"); :root { diff --git a/utils/themes/GT-RevertRebrand-main/README.md b/utils/themes/GT-RevertRebrand-main/README.md index e463215..3fb7430 100644 --- a/utils/themes/GT-RevertRebrand-main/README.md +++ b/utils/themes/GT-RevertRebrand-main/README.md @@ -1,12 +1,3 @@ -# GT-RevertRebrand +# GT-RevertRebrand ArmCord Reverts Discord's 2021 rebrand (font, colors, reactions, mentions, loading screen, home icon, reply ping color, and more) - -## Mods Supported - -- Powercord -- BetterDiscord -- Vizality - -## Screenshots - diff --git a/utils/themes/GT-RevertRebrand-main/assets/authorized_apps_checkmark_icon.svg b/utils/themes/GT-RevertRebrand-main/assets/authorized_apps_checkmark_icon.svg deleted file mode 100644 index c379d0e..0000000 --- a/utils/themes/GT-RevertRebrand-main/assets/authorized_apps_checkmark_icon.svg +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/utils/themes/GT-RevertRebrand-main/assets/call_icon.svg b/utils/themes/GT-RevertRebrand-main/assets/call_icon.svg deleted file mode 100644 index 63cbd39..0000000 --- a/utils/themes/GT-RevertRebrand-main/assets/call_icon.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/utils/themes/GT-RevertRebrand-main/assets/mfa_lock_icon.svg b/utils/themes/GT-RevertRebrand-main/assets/mfa_lock_icon.svg deleted file mode 100644 index 67d2121..0000000 --- a/utils/themes/GT-RevertRebrand-main/assets/mfa_lock_icon.svg +++ /dev/null @@ -1,11 +0,0 @@ - - - icon-green-lock - Created with Sketch. - - - - - - - diff --git a/utils/themes/GT-RevertRebrand-main/assets/server_join_icon.svg b/utils/themes/GT-RevertRebrand-main/assets/server_join_icon.svg deleted file mode 100644 index 419984e..0000000 --- a/utils/themes/GT-RevertRebrand-main/assets/server_join_icon.svg +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/utils/themes/GT-RevertRebrand-main/gnTheme.mjs b/utils/themes/GT-RevertRebrand-main/gnTheme.mjs deleted file mode 100644 index 0661ae4..0000000 --- a/utils/themes/GT-RevertRebrand-main/gnTheme.mjs +++ /dev/null @@ -1,6 +0,0 @@ -export default { - name: 'Revert Rebrand', - description: 'Reverts Discord\'s 2021 rebrand (font, colors, reactions, mentions, loading screen, home icon, reply ping color, and more)', - version: '3.0', - screenshots: [] -}; diff --git a/utils/themes/GT-RevertRebrand-main/manifest.json b/utils/themes/GT-RevertRebrand-main/manifest.json index c464284..9af1803 100644 --- a/utils/themes/GT-RevertRebrand-main/manifest.json +++ b/utils/themes/GT-RevertRebrand-main/manifest.json @@ -4,5 +4,5 @@ "version": "3.0", "author": "GooseNest", "license": "MIT", - "theme": "src/main.scss" + "theme": "RevertRebrand.theme.css" } \ No newline at end of file diff --git a/utils/themes/GT-RevertRebrand-main/powercord_manifest.json b/utils/themes/GT-RevertRebrand-main/powercord_manifest.json deleted file mode 100644 index c464284..0000000 --- a/utils/themes/GT-RevertRebrand-main/powercord_manifest.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "name": "Revert Rebrand", - "description": "Reverts Discord's 2021 rebrand (font, colors, reactions, mentions, loading screen, home icon, reply ping color, and more)", - "version": "3.0", - "author": "GooseNest", - "license": "MIT", - "theme": "src/main.scss" -} \ No newline at end of file diff --git a/utils/themes/GT-RevertRebrand-main/src/components/mentions.css b/utils/themes/GT-RevertRebrand-main/src/components/mentions.css deleted file mode 100644 index 55b6071..0000000 --- a/utils/themes/GT-RevertRebrand-main/src/components/mentions.css +++ /dev/null @@ -1,14 +0,0 @@ -/* Revert mentions and channel links */ -#app-mount .wrapper-3WhCwL { - color: var(--brand-experiment-400); - background: var(--brand-experiment-10a); -} - -#app-mount .wrapper-3WhCwL:hover { - background: var(--brand-experiment-25a); -} - -/* Hide semi-transparent background if mentioned in message */ -/* .mentioned-xhSam7 .mention { - background: transparent !important; -} */ \ No newline at end of file diff --git a/utils/themes/GT-RevertRebrand-main/src/components/reactions.css b/utils/themes/GT-RevertRebrand-main/src/components/reactions.css deleted file mode 100644 index 112f25c..0000000 --- a/utils/themes/GT-RevertRebrand-main/src/components/reactions.css +++ /dev/null @@ -1,39 +0,0 @@ -/* Revert reactions */ -.reaction-1hd86g { - border-radius: .25rem; - background: var(--background-modifier-selected); - - border-color: transparent !important; - - margin-right: 3px; -} - -.reaction-1hd86g .reactionCount-2mvXRV { - color: var(--text-muted); /* A11Y-- */ -} - -.reaction-1hd86g .reactionInner-15NvIl { - padding: 0 4.5px; -} - -/* Self reactions */ -.reaction-1hd86g.reactionMe-wv5HKu .reactionCount-2mvXRV { - color: var(--brand-experiment); /* A11Y-- */ -} - -.reaction-1hd86g.reactionMe-wv5HKu { - background-color: var(--brand-experiment-30a); -} - -/* Reaction hover */ -.reaction-1hd86g:hover .reactionCount-2mvXRV { - color: var(--interactive-active) !important; -} - -.reaction-1hd86g:hover { - background-color: var(--background-modifier-selected); -} - -.reaction-1hd86g.reactionMe-wv5HKu:hover { - background-color: var(--brand-experiment-40a); -} \ No newline at end of file diff --git a/utils/themes/GT-RevertRebrand-main/src/general/bd.css b/utils/themes/GT-RevertRebrand-main/src/general/bd.css deleted file mode 100644 index 00a66a0..0000000 --- a/utils/themes/GT-RevertRebrand-main/src/general/bd.css +++ /dev/null @@ -1,4 +0,0 @@ -/* Color BD specific settings elements */ -.bd-addon-views .bd-view-button.selected, .bd-button { - background-color: var(--brand-experiment); -} \ No newline at end of file diff --git a/utils/themes/GT-RevertRebrand-main/src/general/inputs.css b/utils/themes/GT-RevertRebrand-main/src/general/inputs.css deleted file mode 100644 index be56f71..0000000 --- a/utils/themes/GT-RevertRebrand-main/src/general/inputs.css +++ /dev/null @@ -1,48 +0,0 @@ -/* Restyle the create server and discovery buttons to the old green */ -.circleIconButton-1QV--U.circleButtonBase-2DCxIZ { - color: var(--old-green); -} -.circleIconButton-1QV--U.circleButtonBase-2DCxIZ.selected-1JjBPm { - color: white; - background-color: var(--old-green); -} - -/* On switches to old green */ -.container-3auIfb[style="opacity: 1; background-color: rgb(59, 165, 92);"] { - background-color: var(--old-green) !important; -} - -/* Text input focus border color is now focus / link, change back to original brand color */ -.input-cIJ7To.focused-1mmYsC, .input-cIJ7To:focus { - border-color: var(--brand-experiment); -} - -/* Restyle the create server and discovery buttons to the old green */ -.circleIconButton-1QV--U.circleButtonBase-2DCxIZ { - color: var(--old-green); -} -.circleIconButton-1QV--U.circleButtonBase-2DCxIZ.selected-1JjBPm { - color: white; - background-color: var(--old-green); -} - -/* On switches to old green */ -.container-3auIfb[style="opacity: 1; background-color: rgb(59, 165, 92);"] { - background-color: var(--old-green) !important; -} - -/* Text input focus border color is now focus / link, change back to original brand color */ -.input-cIJ7To.focused-1mmYsC, .input-cIJ7To:focus { - border-color: var(--brand-experiment); -} - -/* Change all radio bars with the new green to the old green */ -/* In particular, this fixes the privacy and safety settings' 'keep me safe' option */ -.radioBar-bMNUI-[style*="--radio-bar-accent-color:#3ba55c"] { - --radio-bar-accent-color: var(--old-green) !important; -} - -/* Revert ping mention button being link colored (used to be brand) */ -.colorLink-2vG20E.size14-e6ZScH.mentionButton-3710-W { - color: var(--brand-experiment) !important; -} \ No newline at end of file diff --git a/utils/themes/GT-RevertRebrand-main/src/general/other.css b/utils/themes/GT-RevertRebrand-main/src/general/other.css deleted file mode 100644 index 292c5cb..0000000 --- a/utils/themes/GT-RevertRebrand-main/src/general/other.css +++ /dev/null @@ -1,50 +0,0 @@ -/* Change green colorables from the new green color to the old green color. */ -/* In particular, this fixes the join call buttons, but it may also fix other stuff around the app */ -.colorable-1bkp8v.green-plH-Mj { - background-color: var(--old-green); -} - -/* Verified check mark color */ -.verified-1eC5dy { - color: var(--old-green); -} - -/* Fix the speaking ring around your avatar in the bottom left corner of your screen */ -.avatarSpeaking-2c8-9i { - box-shadow: inset 0 0 0 2px var(--old-green), inset 0 0 0 3px #2f3136; -} - -/* And fix speaking avatars in calls in general */ -.speaking-B2MXPi.border-Jn5IOt { - box-shadow: inset 0 0 0 2px var(--old-green), inset 0 0 0 3px #2f3136; -} - -/* Revert new Nitro icon by setting item */ -.premiumTabItem-1QTfBr .icon-Zc-uZZ { - display: none; -} - -/* Online status */ -.wrapper-3t9DeA rect.pointerEvents-2zdfdO[mask="url(#svg-mask-status-online)"]:not([fill="#ffffff"]) { - fill: var(--old-green); -} - -/* Online status (mobile) */ -.wrapper-3t9DeA rect.pointerEvents-2zdfdO[mask="url(#svg-mask-status-online-mobile)"]:not([fill="#ffffff"]) { - fill: var(--old-green); -} - -/* Online status (typing and other) */ -.wrapper-3t9DeA svg.cursorDefault-dsQJ1n > rect[fill="#3ba55c"] { - fill: var(--old-green); -} - -/* Revert loading tip title color */ -.tipTitle-GL9qAt { - color: var(--brand-experiment) !important; -} - -/* Revert home icon */ -.homeIcon-FuNwkv > path { - d: path("M 20.6644 20 C 20.6644 20 19.8014 18.9762 19.0822 18.0714 C 22.2226 17.1905 23.4212 15.2381 23.4212 15.2381 C 22.4384 15.881 21.5034 16.3334 20.6644 16.6429 C 19.4658 17.1429 18.3151 17.4762 17.1884 17.6667 C 14.887 18.0953 12.7774 17.9762 10.9795 17.6429 C 9.61301 17.381 8.43836 17 7.45548 16.6191 C 6.90411 16.4048 6.30479 16.1429 5.70548 15.8096 C 5.63356 15.7619 5.56164 15.7381 5.48973 15.6905 C 5.44178 15.6667 5.41781 15.6429 5.39384 15.6191 C 4.96233 15.381 4.7226 15.2143 4.7226 15.2143 C 4.7226 15.2143 5.87329 17.1191 8.91781 18.0238 C 8.19863 18.9286 7.31164 20 7.31164 20 C 2.0137 19.8333 0 16.381 0 16.381 C 0 8.7144 3.45205 2.50017 3.45205 2.50017 C 6.90411 -0.07123 10.1884 0.000197861 10.1884 0.000197861 L 10.4281 0.285909 C 6.11301 1.52399 4.12329 3.40493 4.12329 3.40493 C 4.12329 3.40493 4.65068 3.11921 5.53767 2.71446 C 8.10274 1.59542 10.1404 1.2859 10.9795 1.21447 C 11.1233 1.19066 11.2432 1.16685 11.387 1.16685 C 12.8493 0.976379 14.5034 0.92876 16.2295 1.11923 C 18.5068 1.38114 20.9521 2.0478 23.4452 3.40493 C 23.4452 3.40493 21.5514 1.61923 17.476 0.381146 L 17.8116 0.000197861 C 17.8116 0.000197861 21.0959 -0.07123 24.5479 2.50017 C 24.5479 2.50017 28 8.7144 28 16.381 C 28 16.381 25.9623 19.8333 20.6644 20 Z M 9.51712 8.88106 C 8.15068 8.88106 7.07192 10.0715 7.07192 11.5239 C 7.07192 12.9763 8.17466 14.1667 9.51712 14.1667 C 10.8836 14.1667 11.9623 12.9763 11.9623 11.5239 C 11.9863 10.0715 10.8836 8.88106 9.51712 8.88106 Z M 18.2671 8.88106 C 16.9007 8.88106 15.8219 10.0715 15.8219 11.5239 C 15.8219 12.9763 16.9247 14.1667 18.2671 14.1667 C 19.6336 14.1667 20.7123 12.9763 20.7123 11.5239 C 20.7123 10.0715 19.6336 8.88106 18.2671 8.88106 Z"); -} \ No newline at end of file diff --git a/utils/themes/GT-RevertRebrand-main/src/general/svgs.css b/utils/themes/GT-RevertRebrand-main/src/general/svgs.css deleted file mode 100644 index 279f5a8..0000000 --- a/utils/themes/GT-RevertRebrand-main/src/general/svgs.css +++ /dev/null @@ -1,25 +0,0 @@ -/* Fix misc SVGs that for some reason sometimes weren't targeted by the previous rules (particularly presence SVGs) */ -*[fill="#3ba55c"] { - fill: var(--old-green); -} - -/* Fix the call icons in chat */ -.icon-2Po-VO.iconSize-2tmqqh[style='background-image: url("/assets/7f75ab26bc5deb393cd8db44d9fe14e7.svg");'] { - background-image: url("https://Goose-Nest.github.io/GT-RevertRebrand/assets/call_icon.svg") !important; -} - -/* Server join icon to old green (arrow left to join system message) */ -.icon-2Po-VO.iconSize-2tmqqh[style='background-image: url("/assets/e06a573355c490f7ce6e3125ac01db81.svg");'] { - background-image: url("https://Goose-Nest.github.io/GT-RevertRebrand/assets/server_join_icon.svg") !important; -} - -/* Change the lock icon in the settings, it's an img tag so we need to use the content: css attribute instead of background-image */ -.lockIcon-2Hj8Tq[src="/assets/acea8fd38500a12d0509c027a274caaa.svg"] { - content: url("https://Goose-Nest.github.io/GT-RevertRebrand/assets/mfa_lock_icon.svg") !important; -} - -/* Permission checkmarks in authorized apps to the old green */ -/* The images in these are specified by class, so it's impossible to get more specific of a match than this */ -.permissionCheckmark-1SeKr2 { - background: url("https://Goose-Nest.github.io/GT-RevertRebrand/assets/authorized_apps_checkmark_icon.svg") no-repeat; -} \ No newline at end of file diff --git a/utils/themes/GT-RevertRebrand-main/src/main.css b/utils/themes/GT-RevertRebrand-main/src/main.css deleted file mode 100644 index 6bb8149..0000000 --- a/utils/themes/GT-RevertRebrand-main/src/main.css +++ /dev/null @@ -1,249 +0,0 @@ -body { - /* Revert new green to old color */ - --old-green: #43b581; - --info-positive-foreground: var(--old-green); - --status-positive-background: var(--old-green); - --text-positive: var(--old-green); - /* Revert new red to old color */ - --old-red: #f04747; - --text-danger: var(--old-red); - --info-danger-foreground: var(--old-red); - --status-danger-background: var(--old-red); - /* Revert to old font var */ - --font-display: var(--font-primary); - /* Found in Discord's CSS file: oldBrand vs newBrand HTML class - here we force old brand vars via copying */ - --brand-experiment-100: #f8f9fd; - --brand-experiment-130: #f2f4fc; - --brand-experiment-160: #ebeefa; - --brand-experiment-200: #e3e7f8; - --brand-experiment-230: #dae0f5; - --brand-experiment-260: #d1d9f3; - --brand-experiment-300: #c7d0f0; - --brand-experiment-330: #b5c1ec; - --brand-experiment-360: #a5b3e7; - --brand-experiment-400: #8ea1e1; - --brand-experiment-430: #869adf; - --brand-experiment-460: #7d92dd; - --brand-experiment: #7289da; - --brand-experiment-500: #7289da; - --brand-experiment-530: #687dc6; - --brand-experiment-560: #5c6fb1; - --brand-experiment-600: #4e5d94; - --brand-experiment-630: #435180; - --brand-experiment-660: #3b4770; - --brand-experiment-700: #2e3757; - --brand-experiment-730: #2b3352; - --brand-experiment-760: #272f4b; - --brand-experiment-800: #222941; - --brand-experiment-830: #1a2032; - --brand-experiment-860: #111521; - --brand-experiment-900: #06070b; - --brand-experiment-05a: rgba(114,137,218,0.05); - --brand-experiment-10a: rgba(114,137,218,0.1); - --brand-experiment-15a: rgba(114,137,218,0.15); - --brand-experiment-20a: rgba(114,137,218,0.2); - --brand-experiment-25a: rgba(114,137,218,0.25); - --brand-experiment-30a: rgba(114,137,218,0.3); - --brand-experiment-35a: rgba(114,137,218,0.35); - --brand-experiment-40a: rgba(114,137,218,0.4); - --brand-experiment-45a: rgba(114,137,218,0.45); - --brand-experiment-50a: rgba(114,137,218,0.5); - --brand-experiment-55a: rgba(114,137,218,0.55); - --brand-experiment-60a: rgba(114,137,218,0.6); - --brand-experiment-65a: rgba(114,137,218,0.65); - --brand-experiment-70a: rgba(114,137,218,0.7); - --brand-experiment-75a: rgba(114,137,218,0.75); - --brand-experiment-80a: rgba(114,137,218,0.8); - --brand-experiment-85a: rgba(114,137,218,0.85); - --brand-experiment-90a: rgba(114,137,218,0.9); - --brand-experiment-95a: rgba(114,137,218,0.95); -} - -/* Revert mentions and channel links */ -#app-mount .wrapper-3WhCwL { - color: var(--brand-experiment-400); - background: var(--brand-experiment-10a); -} - -#app-mount .wrapper-3WhCwL:hover { - background: var(--brand-experiment-25a); -} - -/* Hide semi-transparent background if mentioned in message */ -/* .mentioned-xhSam7 .mention { - background: transparent !important; -} */ -/* Revert reactions */ -.reaction-1hd86g { - border-radius: 0.25rem; - background: var(--background-modifier-selected); - border-color: transparent !important; - margin-right: 3px; -} - -.reaction-1hd86g .reactionCount-2mvXRV { - color: var(--text-muted); - /* A11Y-- */ -} - -.reaction-1hd86g .reactionInner-15NvIl { - padding: 0 4.5px; -} - -/* Self reactions */ -.reaction-1hd86g.reactionMe-wv5HKu .reactionCount-2mvXRV { - color: var(--brand-experiment); - /* A11Y-- */ -} - -.reaction-1hd86g.reactionMe-wv5HKu { - background-color: var(--brand-experiment-30a); -} - -/* Reaction hover */ -.reaction-1hd86g:hover .reactionCount-2mvXRV { - color: var(--interactive-active) !important; -} - -.reaction-1hd86g:hover { - background-color: var(--background-modifier-selected); -} - -.reaction-1hd86g.reactionMe-wv5HKu:hover { - background-color: var(--brand-experiment-40a); -} - -/* Color BD specific settings elements */ -.bd-addon-views .bd-view-button.selected, .bd-button { - background-color: var(--brand-experiment); -} - -/* Restyle the create server and discovery buttons to the old green */ -.circleIconButton-1QV--U.circleButtonBase-2DCxIZ { - color: var(--old-green); -} - -.circleIconButton-1QV--U.circleButtonBase-2DCxIZ.selected-1JjBPm { - color: white; - background-color: var(--old-green); -} - -/* On switches to old green */ -.container-3auIfb[style="opacity: 1; background-color: rgb(59, 165, 92);"] { - background-color: var(--old-green) !important; -} - -/* Text input focus border color is now focus / link, change back to original brand color */ -.input-cIJ7To.focused-1mmYsC, .input-cIJ7To:focus { - border-color: var(--brand-experiment); -} - -/* Restyle the create server and discovery buttons to the old green */ -.circleIconButton-1QV--U.circleButtonBase-2DCxIZ { - color: var(--old-green); -} - -.circleIconButton-1QV--U.circleButtonBase-2DCxIZ.selected-1JjBPm { - color: white; - background-color: var(--old-green); -} - -/* On switches to old green */ -.container-3auIfb[style="opacity: 1; background-color: rgb(59, 165, 92);"] { - background-color: var(--old-green) !important; -} - -/* Text input focus border color is now focus / link, change back to original brand color */ -.input-cIJ7To.focused-1mmYsC, .input-cIJ7To:focus { - border-color: var(--brand-experiment); -} - -/* Change all radio bars with the new green to the old green */ -/* In particular, this fixes the privacy and safety settings' 'keep me safe' option */ -.radioBar-bMNUI-[style*="--radio-bar-accent-color:#3ba55c"] { - --radio-bar-accent-color: var(--old-green) !important; -} - -/* Revert ping mention button being link colored (used to be brand) */ -.colorLink-2vG20E.size14-e6ZScH.mentionButton-3710-W { - color: var(--brand-experiment) !important; -} - -/* Fix misc SVGs that for some reason sometimes weren't targeted by the previous rules (particularly presence SVGs) */ -*[fill="#3ba55c"] { - fill: var(--old-green); -} - -/* Fix the call icons in chat */ -.icon-2Po-VO.iconSize-2tmqqh[style='background-image: url("/assets/7f75ab26bc5deb393cd8db44d9fe14e7.svg");'] { - background-image: url("https://Goose-Nest.github.io/GT-RevertRebrand/assets/call_icon.svg") !important; -} - -/* Server join icon to old green (arrow left to join system message) */ -.icon-2Po-VO.iconSize-2tmqqh[style='background-image: url("/assets/e06a573355c490f7ce6e3125ac01db81.svg");'] { - background-image: url("https://Goose-Nest.github.io/GT-RevertRebrand/assets/server_join_icon.svg") !important; -} - -/* Change the lock icon in the settings, it's an img tag so we need to use the content: css attribute instead of background-image */ -.lockIcon-2Hj8Tq[src="/assets/acea8fd38500a12d0509c027a274caaa.svg"] { - content: url("https://Goose-Nest.github.io/GT-RevertRebrand/assets/mfa_lock_icon.svg") !important; -} - -/* Permission checkmarks in authorized apps to the old green */ -/* The images in these are specified by class, so it's impossible to get more specific of a match than this */ -.permissionCheckmark-1SeKr2 { - background: url("https://Goose-Nest.github.io/GT-RevertRebrand/assets/authorized_apps_checkmark_icon.svg") no-repeat; -} - -/* Change green colorables from the new green color to the old green color. */ -/* In particular, this fixes the join call buttons, but it may also fix other stuff around the app */ -.colorable-1bkp8v.green-plH-Mj { - background-color: var(--old-green); -} - -/* Verified check mark color */ -.verified-1eC5dy { - color: var(--old-green); -} - -/* Fix the speaking ring around your avatar in the bottom left corner of your screen */ -.avatarSpeaking-2c8-9i { - box-shadow: inset 0 0 0 2px var(--old-green), inset 0 0 0 3px #2f3136; -} - -/* And fix speaking avatars in calls in general */ -.speaking-B2MXPi.border-Jn5IOt { - box-shadow: inset 0 0 0 2px var(--old-green), inset 0 0 0 3px #2f3136; -} - -/* Revert new Nitro icon by setting item */ -.premiumTabItem-1QTfBr .icon-Zc-uZZ { - display: none; -} - -/* Online status */ -.wrapper-3t9DeA rect.pointerEvents-2zdfdO[mask="url(#svg-mask-status-online)"]:not([fill="#ffffff"]) { - fill: var(--old-green); -} - -/* Online status (mobile) */ -.wrapper-3t9DeA rect.pointerEvents-2zdfdO[mask="url(#svg-mask-status-online-mobile)"]:not([fill="#ffffff"]) { - fill: var(--old-green); -} - -/* Online status (typing and other) */ -.wrapper-3t9DeA svg.cursorDefault-dsQJ1n > rect[fill="#3ba55c"] { - fill: var(--old-green); -} - -/* Revert loading tip title color */ -.tipTitle-GL9qAt { - color: var(--brand-experiment) !important; -} - -/* Revert home icon */ -.homeIcon-FuNwkv > path { - d: path("M 20.6644 20 C 20.6644 20 19.8014 18.9762 19.0822 18.0714 C 22.2226 17.1905 23.4212 15.2381 23.4212 15.2381 C 22.4384 15.881 21.5034 16.3334 20.6644 16.6429 C 19.4658 17.1429 18.3151 17.4762 17.1884 17.6667 C 14.887 18.0953 12.7774 17.9762 10.9795 17.6429 C 9.61301 17.381 8.43836 17 7.45548 16.6191 C 6.90411 16.4048 6.30479 16.1429 5.70548 15.8096 C 5.63356 15.7619 5.56164 15.7381 5.48973 15.6905 C 5.44178 15.6667 5.41781 15.6429 5.39384 15.6191 C 4.96233 15.381 4.7226 15.2143 4.7226 15.2143 C 4.7226 15.2143 5.87329 17.1191 8.91781 18.0238 C 8.19863 18.9286 7.31164 20 7.31164 20 C 2.0137 19.8333 0 16.381 0 16.381 C 0 8.7144 3.45205 2.50017 3.45205 2.50017 C 6.90411 -0.07123 10.1884 0.000197861 10.1884 0.000197861 L 10.4281 0.285909 C 6.11301 1.52399 4.12329 3.40493 4.12329 3.40493 C 4.12329 3.40493 4.65068 3.11921 5.53767 2.71446 C 8.10274 1.59542 10.1404 1.2859 10.9795 1.21447 C 11.1233 1.19066 11.2432 1.16685 11.387 1.16685 C 12.8493 0.976379 14.5034 0.92876 16.2295 1.11923 C 18.5068 1.38114 20.9521 2.0478 23.4452 3.40493 C 23.4452 3.40493 21.5514 1.61923 17.476 0.381146 L 17.8116 0.000197861 C 17.8116 0.000197861 21.0959 -0.07123 24.5479 2.50017 C 24.5479 2.50017 28 8.7144 28 16.381 C 28 16.381 25.9623 19.8333 20.6644 20 Z M 9.51712 8.88106 C 8.15068 8.88106 7.07192 10.0715 7.07192 11.5239 C 7.07192 12.9763 8.17466 14.1667 9.51712 14.1667 C 10.8836 14.1667 11.9623 12.9763 11.9623 11.5239 C 11.9863 10.0715 10.8836 8.88106 9.51712 8.88106 Z M 18.2671 8.88106 C 16.9007 8.88106 15.8219 10.0715 15.8219 11.5239 C 15.8219 12.9763 16.9247 14.1667 18.2671 14.1667 C 19.6336 14.1667 20.7123 12.9763 20.7123 11.5239 C 20.7123 10.0715 19.6336 8.88106 18.2671 8.88106 Z"); -} - -/* Import all the CSS files */ \ No newline at end of file diff --git a/utils/themes/GT-RevertRebrand-main/src/main.scss b/utils/themes/GT-RevertRebrand-main/src/main.scss deleted file mode 100644 index fcefb7c..0000000 --- a/utils/themes/GT-RevertRebrand-main/src/main.scss +++ /dev/null @@ -1,11 +0,0 @@ -/* Import all the CSS files */ - -@use "variables"; - -@use "components/mentions"; -@use "components/reactions"; - -@use "general/bd"; -@use "general/inputs"; -@use "general/svgs"; -@use "general/other"; \ No newline at end of file diff --git a/utils/themes/GT-RevertRebrand-main/src/variables.css b/utils/themes/GT-RevertRebrand-main/src/variables.css deleted file mode 100644 index 24e4a46..0000000 --- a/utils/themes/GT-RevertRebrand-main/src/variables.css +++ /dev/null @@ -1,66 +0,0 @@ -body { - /* Revert new green to old color */ - --old-green: #43b581; - --info-positive-foreground: var(--old-green); - --status-positive-background: var(--old-green); - --text-positive: var(--old-green); - - /* Revert new red to old color */ - --old-red: #f04747; - --text-danger: var(--old-red); - --info-danger-foreground: var(--old-red); - --status-danger-background: var(--old-red); - - /* Revert to old font var */ - --font-display: var(--font-primary); - - /* Found in Discord's CSS file: oldBrand vs newBrand HTML class - here we force old brand vars via copying */ - --brand-experiment-100: #f8f9fd; - --brand-experiment-130: #f2f4fc; - --brand-experiment-160: #ebeefa; - --brand-experiment-200: #e3e7f8; - --brand-experiment-230: #dae0f5; - --brand-experiment-260: #d1d9f3; - --brand-experiment-300: #c7d0f0; - --brand-experiment-330: #b5c1ec; - --brand-experiment-360: #a5b3e7; - --brand-experiment-400: #8ea1e1; - --brand-experiment-430: #869adf; - --brand-experiment-460: #7d92dd; - - --brand-experiment: #7289da; - - --brand-experiment-500: #7289da; - --brand-experiment-530: #687dc6; - --brand-experiment-560: #5c6fb1; - --brand-experiment-600: #4e5d94; - --brand-experiment-630: #435180; - --brand-experiment-660: #3b4770; - --brand-experiment-700: #2e3757; - --brand-experiment-730: #2b3352; - --brand-experiment-760: #272f4b; - --brand-experiment-800: #222941; - --brand-experiment-830: #1a2032; - --brand-experiment-860: #111521; - --brand-experiment-900: #06070b; - - --brand-experiment-05a: rgba(114,137,218,0.05); - --brand-experiment-10a: rgba(114,137,218,0.1); - --brand-experiment-15a: rgba(114,137,218,0.15); - --brand-experiment-20a: rgba(114,137,218,0.2); - --brand-experiment-25a: rgba(114,137,218,0.25); - --brand-experiment-30a: rgba(114,137,218,0.3); - --brand-experiment-35a: rgba(114,137,218,0.35); - --brand-experiment-40a: rgba(114,137,218,0.4); - --brand-experiment-45a: rgba(114,137,218,0.45); - --brand-experiment-50a: rgba(114,137,218,0.5); - --brand-experiment-55a: rgba(114,137,218,0.55); - --brand-experiment-60a: rgba(114,137,218,0.6); - --brand-experiment-65a: rgba(114,137,218,0.65); - --brand-experiment-70a: rgba(114,137,218,0.7); - --brand-experiment-75a: rgba(114,137,218,0.75); - --brand-experiment-80a: rgba(114,137,218,0.8); - --brand-experiment-85a: rgba(114,137,218,0.85); - --brand-experiment-90a: rgba(114,137,218,0.9); - --brand-experiment-95a: rgba(114,137,218,0.95); -} \ No newline at end of file From 0c7b7af2b3f024f89e1b96120e8dc2b40853e1ac Mon Sep 17 00:00:00 2001 From: smartfridge <37928912+smartfrigde@users.noreply.github.com> Date: Sat, 15 May 2021 16:20:57 +0200 Subject: [PATCH 13/19] SCSS warning that doesn't work :godmode: --- utils/theme.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/utils/theme.js b/utils/theme.js index dc92b95..15fa223 100644 --- a/utils/theme.js +++ b/utils/theme.js @@ -10,6 +10,12 @@ window.addEventListener("DOMContentLoaded", () => { console.log(themeFile.theme); console.log(themeFile) const theme = fs.readFileSync(`${__dirname}/themes/${file}/${themeFile.theme}`, "utf8"); + if (themeFile.theme.endsWith(".scss")) { + console.log( + `%cCouldn't load ${themeFile.name} made by ${themeFile.author}. ArmCord doesn't suppot scss files if you want to have this theme ported feel free to reach out https://discord.gg/F25bc4RYDt `, + "color:red; font-weight: bold; font-size: 50px;color: red;" + ); + } armcord.addStyle(theme); console.log(`%cLoaded ${themeFile.name} made by ${themeFile.author}`, "color:red"); } catch (err) { From 8cdd7e15b76e0c02479e077d476ce3dfd8cf8440 Mon Sep 17 00:00:00 2001 From: smartfridge <37928912+smartfrigde@users.noreply.github.com> Date: Sun, 16 May 2021 13:08:20 +0200 Subject: [PATCH 14/19] fix typo --- preload.js | 1 - utils/theme.js | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/preload.js b/preload.js index 2966446..d2db5d6 100644 --- a/preload.js +++ b/preload.js @@ -8,7 +8,6 @@ window.addEventListener("DOMContentLoaded", () => { backgroundColor: customTitlebar.Color.fromHex("#202225"), menu: false, }); - const currentWindow = remote.getCurrentWindow(); electronLocalshortcut.register(currentWindow, "F5", () => { location.reload(); diff --git a/utils/theme.js b/utils/theme.js index 15fa223..b58dc05 100644 --- a/utils/theme.js +++ b/utils/theme.js @@ -12,7 +12,7 @@ window.addEventListener("DOMContentLoaded", () => { const theme = fs.readFileSync(`${__dirname}/themes/${file}/${themeFile.theme}`, "utf8"); if (themeFile.theme.endsWith(".scss")) { console.log( - `%cCouldn't load ${themeFile.name} made by ${themeFile.author}. ArmCord doesn't suppot scss files if you want to have this theme ported feel free to reach out https://discord.gg/F25bc4RYDt `, + `%cCouldn't load ${themeFile.name} made by ${themeFile.author}. ArmCord doesn't support scss files if you want to have this theme ported feel free to reach out https://discord.gg/F25bc4RYDt `, "color:red; font-weight: bold; font-size: 50px;color: red;" ); } From 22f8ea112335a8a5546f0f1217d38045c4b44f56 Mon Sep 17 00:00:00 2001 From: smartfridge <37928912+smartfrigde@users.noreply.github.com> Date: Sun, 16 May 2021 16:29:37 +0200 Subject: [PATCH 15/19] Plugin Loading --- main.js | 4 +--- utils/plugin.js | 23 +++++++++++++++++++ {goosemod => utils/plugins/goosemod}/CSP.js | 0 {goosemod => utils/plugins/goosemod}/LICENSE | 0 {goosemod => utils/plugins/goosemod}/gm.js | 0 .../plugins/goosemod}/manifest.json | 1 + 6 files changed, 25 insertions(+), 3 deletions(-) create mode 100644 utils/plugin.js rename {goosemod => utils/plugins/goosemod}/CSP.js (100%) rename {goosemod => utils/plugins/goosemod}/LICENSE (100%) rename {goosemod => utils/plugins/goosemod}/gm.js (100%) rename {goosemod => utils/plugins/goosemod}/manifest.json (93%) diff --git a/main.js b/main.js index 565d915..0b97d8d 100644 --- a/main.js +++ b/main.js @@ -101,9 +101,7 @@ function createWindow() { // Some APIs can only be used after this event occurs. app.whenReady().then(() => { createWindow(); - session.defaultSession.loadExtension( - `${require("electron").app.getAppPath()}/goosemod/` - ); + require("./utils/plugin.js"); session .fromPartition("some-partition") .setPermissionRequestHandler((webContents, permission, callback) => { diff --git a/utils/plugin.js b/utils/plugin.js new file mode 100644 index 0000000..cfcfe7a --- /dev/null +++ b/utils/plugin.js @@ -0,0 +1,23 @@ +const fs = require("fs"); +const { app, session, remote } = require("electron"); +const pluginFolder = __dirname + "/plugins/"; +app.whenReady().then(() => { +fs.readdirSync(pluginFolder).forEach((file) => { + console.log(file); + try { + const manifest = fs.readFileSync( + `${__dirname}/plugins/${file}/manifest.json`, + "utf8" + ); + var pluginFile = JSON.parse(manifest); + console.log(pluginFile); + session.defaultSession.loadExtension(`${__dirname}/plugins/${file}/`); + console.log( + `%cLoaded ${pluginFile.name} made by ${pluginFile.author}`, + "color:red" + ); + } catch (err) { + console.error(err); + } +}); +}); diff --git a/goosemod/CSP.js b/utils/plugins/goosemod/CSP.js similarity index 100% rename from goosemod/CSP.js rename to utils/plugins/goosemod/CSP.js diff --git a/goosemod/LICENSE b/utils/plugins/goosemod/LICENSE similarity index 100% rename from goosemod/LICENSE rename to utils/plugins/goosemod/LICENSE diff --git a/goosemod/gm.js b/utils/plugins/goosemod/gm.js similarity index 100% rename from goosemod/gm.js rename to utils/plugins/goosemod/gm.js diff --git a/goosemod/manifest.json b/utils/plugins/goosemod/manifest.json similarity index 93% rename from goosemod/manifest.json rename to utils/plugins/goosemod/manifest.json index 5d71e59..f073a57 100644 --- a/goosemod/manifest.json +++ b/utils/plugins/goosemod/manifest.json @@ -1,6 +1,7 @@ { "name": "GooseMod", "version": "1.0", + "author": "AAGaming00", "description": "Loads GooseMod, a discord client modification", "background": { "scripts": [ From 7fe38ad3071cbc462ac6fc14c649c8038281fc6e Mon Sep 17 00:00:00 2001 From: smartfridge <37928912+smartfrigde@users.noreply.github.com> Date: Sun, 16 May 2021 16:31:20 +0200 Subject: [PATCH 16/19] remove remote in require thing since it's not used --- utils/plugin.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/plugin.js b/utils/plugin.js index cfcfe7a..d569d67 100644 --- a/utils/plugin.js +++ b/utils/plugin.js @@ -1,5 +1,5 @@ const fs = require("fs"); -const { app, session, remote } = require("electron"); +const { app, session } = require("electron"); const pluginFolder = __dirname + "/plugins/"; app.whenReady().then(() => { fs.readdirSync(pluginFolder).forEach((file) => { From df83567d9915983aedb1611a8625c2da39d6ca7d Mon Sep 17 00:00:00 2001 From: KayoticCarnige Date: Thu, 20 May 2021 12:00:51 -0400 Subject: [PATCH 17/19] Fixed up the theme menu CSS and removed "Download Discord" popup --- preload.js | 3 +++ theme.html | 42 +++++++++++++++++++++++++++++++----------- 2 files changed, 34 insertions(+), 11 deletions(-) diff --git a/preload.js b/preload.js index d2db5d6..44bdfe1 100644 --- a/preload.js +++ b/preload.js @@ -75,6 +75,9 @@ div.menubar[role="menubar"] { .titlebar .window-controls-container .window-icon { background: var(--window-buttons) !important; } +.notice-3bPHh-.colorDefault-22HBa0 { + display: none; +} `); ArmCord.addStyle( diff --git a/theme.html b/theme.html index 6533388..c035ebc 100644 --- a/theme.html +++ b/theme.html @@ -27,20 +27,11 @@ transform: translateY(-105%); } - h1:before { + .logo:before { content: "ARM"; color: #7289da; font-weight: normal; font-family: Helvetica, sans-serif; - font-size: 32px; - } - - h1:after { - content: "Cord"; - color: #ffffff; - font-weight: normal; - font-family: Discordinated; - font-size: 32px; } span { @@ -52,6 +43,7 @@ font-weight: normal; font-family: Discordinated; font-size: 32px; + text-align: center; } .container { @@ -61,11 +53,39 @@ color: #fff; transform: translate(-50%, -50%); } + + button.back-btn { + position: absolute; + background-color: #7289da; + font-family: Whitney,"Helvetica Neue",Helvetica,Arial,sans-serif; + color: #ffffff; + padding: 4px; + border-radius: 5px; + width: 105px; + height: 25px; + margin-top: 5px; + margin-left: 5px; + text-align: center; + border-style: none; + outline: none; + } + + button.back-btn:hover { + background-color: #687dc6; + border-style: none; + outline: none; + cursor: pointer; + } + + button.back-btn:active { + background-color: #5c6fb1; + } - + +
From 803ed7629a56bd28a25c9ebf6af000e6a880c6e5 Mon Sep 17 00:00:00 2001 From: smartfridge <37928912+smartfrigde@users.noreply.github.com> Date: Thu, 20 May 2021 18:10:37 +0200 Subject: [PATCH 18/19] bump version uwu baka lol --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index e5d0f06..dd2997d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,11 +1,11 @@ { "name": "armcord", - "version": "2.3.0", + "version": "2.4.0", "lockfileVersion": 2, "requires": true, "packages": { "": { - "version": "2.3.0", + "version": "2.4.0", "license": "MIT", "dependencies": { "custom-electron-titlebar": "3.2.6", diff --git a/package.json b/package.json index 0eec7e7..3bdc6e9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "armcord", - "version": "2.4.0", + "version": "2.5.0", "description": "ArmCord is a Discord client made for ARM Linux that allows you to customize your experience.", "main": "main.js", "scripts": { From 2faf59b43e74aa4e041fa472da523e69bd231325 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 20 May 2021 16:11:38 +0000 Subject: [PATCH 19/19] Bump electron from 12.0.6 to 12.0.9 Bumps [electron](https://github.com/electron/electron) from 12.0.6 to 12.0.9. - [Release notes](https://github.com/electron/electron/releases) - [Changelog](https://github.com/electron/electron/blob/master/docs/breaking-changes.md) - [Commits](https://github.com/electron/electron/compare/v12.0.6...v12.0.9) Signed-off-by: dependabot[bot] --- package-lock.json | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index dd2997d..d73bdd4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,11 +1,11 @@ { "name": "armcord", - "version": "2.4.0", + "version": "2.5.0", "lockfileVersion": 2, "requires": true, "packages": { "": { - "version": "2.4.0", + "version": "2.5.0", "license": "MIT", "dependencies": { "custom-electron-titlebar": "3.2.6", @@ -2229,9 +2229,9 @@ } }, "node_modules/electron": { - "version": "12.0.6", - "resolved": "https://registry.npmjs.org/electron/-/electron-12.0.6.tgz", - "integrity": "sha512-+fqhpdG6Fd6LzsizMdaSPC1I8tfsMT8/7fsYBgABED3hEWdus/rt6CQ54P3/EWZyQebtyHR6HXtlofUqKMV3KQ==", + "version": "12.0.9", + "resolved": "https://registry.npmjs.org/electron/-/electron-12.0.9.tgz", + "integrity": "sha512-p5aEt1tIh/PYjwN+6MHTc5HtW529XR9r4Qlj9PPcSb5ubkotSsS0BtWJoRPhDenSAN8sgHk3sbZLxXPJtdnRYA==", "dev": true, "hasInstallScript": true, "dependencies": { @@ -8866,9 +8866,9 @@ } }, "electron": { - "version": "12.0.6", - "resolved": "https://registry.npmjs.org/electron/-/electron-12.0.6.tgz", - "integrity": "sha512-+fqhpdG6Fd6LzsizMdaSPC1I8tfsMT8/7fsYBgABED3hEWdus/rt6CQ54P3/EWZyQebtyHR6HXtlofUqKMV3KQ==", + "version": "12.0.9", + "resolved": "https://registry.npmjs.org/electron/-/electron-12.0.9.tgz", + "integrity": "sha512-p5aEt1tIh/PYjwN+6MHTc5HtW529XR9r4Qlj9PPcSb5ubkotSsS0BtWJoRPhDenSAN8sgHk3sbZLxXPJtdnRYA==", "dev": true, "requires": { "@electron/get": "^1.0.1",