mirror of
https://github.com/smartfrigde/armcord.git
synced 2024-08-14 23:56:58 +00:00
Merge branch 'canary' into dependabot/npm_and_yarn/electron-12.0.9
This commit is contained in:
commit
8532a7742e
15 changed files with 223 additions and 95 deletions
7
main.js
7
main.js
|
@ -73,6 +73,9 @@ function createWindow() {
|
|||
},
|
||||
},
|
||||
]);
|
||||
appIcon.on("click", () => {
|
||||
mainWindow.show()
|
||||
});
|
||||
|
||||
appIcon.setContextMenu(contextMenu);
|
||||
|
||||
|
@ -98,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) => {
|
||||
|
|
70
package-lock.json
generated
70
package-lock.json
generated
|
@ -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": {
|
||||
|
|
|
@ -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",
|
||||
|
|
55
renderer.js
55
renderer.js
|
@ -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');
|
||||
}
|
||||
}
|
||||
}
|
91
theme.html
Normal file
91
theme.html
Normal file
|
@ -0,0 +1,91 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<title>ArmCord Theme Manager</title>
|
||||
<style>
|
||||
@import url("https://kckarnige.github.io/femboi_owo/discord-font.css");
|
||||
|
||||
:root {
|
||||
background-color: #2c2f33;
|
||||
--header-secondary: #b9bbbe;
|
||||
--header-primary: #fff;
|
||||
--background-tertiary: #202225;
|
||||
}
|
||||
|
||||
body {
|
||||
color: white;
|
||||
}
|
||||
|
||||
p {
|
||||
color: white;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 0px;
|
||||
text-align: center;
|
||||
transform: translateY(-105%);
|
||||
}
|
||||
|
||||
.logo:before {
|
||||
content: "ARM";
|
||||
color: #7289da;
|
||||
font-weight: normal;
|
||||
font-family: Helvetica, sans-serif;
|
||||
}
|
||||
|
||||
span {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.logo {
|
||||
color: #ffffff;
|
||||
font-weight: normal;
|
||||
font-family: Discordinated;
|
||||
font-size: 32px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.container {
|
||||
position: fixed;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
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;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<a href="https://discord.com/app"><button class="back-btn">Back to Discord</button></a>
|
||||
<p class="logo">Cord Theme Manager</p>
|
||||
<div id="tm-list"></div>
|
||||
</body>
|
||||
</html>
|
23
utils/plugin.js
Normal file
23
utils/plugin.js
Normal file
|
@ -0,0 +1,23 @@
|
|||
const fs = require("fs");
|
||||
const { app, session } = 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);
|
||||
}
|
||||
});
|
||||
});
|
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
"name": "GooseMod",
|
||||
"version": "1.0",
|
||||
"author": "AAGaming00",
|
||||
"description": "Loads GooseMod, a discord client modification",
|
||||
"background": {
|
||||
"scripts": [
|
25
utils/theme.js
Normal file
25
utils/theme.js
Normal file
|
@ -0,0 +1,25 @@
|
|||
const fs = require("fs");
|
||||
const armcord = require("./armcord.js");
|
||||
const themeFolder = __dirname + "/themes/";
|
||||
window.addEventListener("DOMContentLoaded", () => {
|
||||
fs.readdirSync(themeFolder).forEach((file) => {
|
||||
console.log(file);
|
||||
try {
|
||||
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");
|
||||
if (themeFile.theme.endsWith(".scss")) {
|
||||
console.log(
|
||||
`%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;"
|
||||
);
|
||||
}
|
||||
armcord.addStyle(theme);
|
||||
console.log(`%cLoaded ${themeFile.name} made by ${themeFile.author}`, "color:red");
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
}
|
||||
});
|
||||
});
|
21
utils/themes/GT-RevertRebrand-main/LICENSE
Normal file
21
utils/themes/GT-RevertRebrand-main/LICENSE
Normal file
|
@ -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.
|
3
utils/themes/GT-RevertRebrand-main/README.md
Normal file
3
utils/themes/GT-RevertRebrand-main/README.md
Normal file
|
@ -0,0 +1,3 @@
|
|||
# GT-RevertRebrand ArmCord
|
||||
|
||||
Reverts Discord's 2021 rebrand (font, colors, reactions, mentions, loading screen, home icon, reply ping color, and more)
|
|
@ -0,0 +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');
|
8
utils/themes/GT-RevertRebrand-main/manifest.json
Normal file
8
utils/themes/GT-RevertRebrand-main/manifest.json
Normal file
|
@ -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": "RevertRebrand.theme.css"
|
||||
}
|
Loading…
Reference in a new issue