mirror of
https://github.com/smartfrigde/armcord.git
synced 2024-08-14 23:56:58 +00:00
the shit is broken + new building system
This commit is contained in:
parent
fdabb6b4de
commit
1d84e24825
9 changed files with 2381 additions and 9463 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,2 +1,3 @@
|
|||
node_modules
|
||||
out/
|
||||
dist
|
BIN
build/icon.ico
Normal file
BIN
build/icon.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 361 KiB |
BIN
build/icon.png
Normal file
BIN
build/icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 28 KiB |
1
main.js
1
main.js
|
@ -101,6 +101,7 @@ function createWindow() {
|
|||
// Some APIs can only be used after this event occurs.
|
||||
app.whenReady().then(() => {
|
||||
createWindow();
|
||||
require("./utils/csp.js");
|
||||
require("./utils/plugin.js");
|
||||
session
|
||||
.fromPartition("some-partition")
|
||||
|
|
11725
package-lock.json
generated
11725
package-lock.json
generated
File diff suppressed because it is too large
Load diff
69
package.json
69
package.json
|
@ -4,11 +4,12 @@
|
|||
"description": "ArmCord is a Discord client made for ARM Linux that allows you to customize your experience.",
|
||||
"main": "main.js",
|
||||
"scripts": {
|
||||
"start": "electron-forge start",
|
||||
"start": "electron .",
|
||||
"test": "echo \"Error: no test specified\" && exit 1",
|
||||
"package": "electron-forge package",
|
||||
"publish": "electron-forge publish",
|
||||
"make": "electron-forge make"
|
||||
"package": "electron-builder --dir",
|
||||
"make": "electron-builder",
|
||||
"linux-build": "electron-builder --linux deb tar.gz rpm AppImage",
|
||||
"windows-build": "electron-builder --windows nsis portable zip appx"
|
||||
},
|
||||
"author": "smartfrigde",
|
||||
"license": "MIT",
|
||||
|
@ -16,18 +17,12 @@
|
|||
"custom-electron-titlebar": "3.2.7",
|
||||
"electron-context-menu": "^3.0.0",
|
||||
"electron-localshortcut": "^3.2.1",
|
||||
"electron-squirrel-startup": "^1.0.0",
|
||||
"electron-store": "^8.0.0",
|
||||
"v8-compile-cache": "^2.3.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@electron-forge/cli": "^6.0.0-beta.54",
|
||||
"@electron-forge/maker-deb": "^6.0.0-beta.55",
|
||||
"@electron-forge/maker-rpm": "^6.0.0-beta.55",
|
||||
"@electron-forge/maker-squirrel": "^6.0.0-beta.55",
|
||||
"@electron-forge/maker-zip": "^6.0.0-beta.55",
|
||||
"@electron-forge/publisher-github": "*",
|
||||
"electron": "latest"
|
||||
"electron": "latest",
|
||||
"electron-builder": "^22.11.7"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
@ -38,48 +33,16 @@
|
|||
"discord",
|
||||
"electron"
|
||||
],
|
||||
"build": {
|
||||
"appId": "com.smartfridge.armcord",
|
||||
"productName": "ArmCord",
|
||||
"asar": "false",
|
||||
"mac": {
|
||||
"category": "Internet"
|
||||
}
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/smartfrigde/armcord/issues"
|
||||
},
|
||||
"homepage": "https://github.com/smartfrigde/armcord#readme",
|
||||
"config": {
|
||||
"forge": {
|
||||
"packagerConfig": {
|
||||
"icon": "discord.png"
|
||||
},
|
||||
"makers": [
|
||||
{
|
||||
"name": "@electron-forge/maker-squirrel",
|
||||
"config": {
|
||||
"name": "ArmCord"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "@electron-forge/maker-zip",
|
||||
"platforms": [
|
||||
"darwin"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "@electron-forge/maker-deb",
|
||||
"config": {}
|
||||
},
|
||||
{
|
||||
"name": "@electron-forge/maker-rpm",
|
||||
"config": {}
|
||||
}
|
||||
],
|
||||
"publishers": [
|
||||
{
|
||||
"name": "@electron-forge/publisher-github",
|
||||
"config": {
|
||||
"repository": {
|
||||
"owner": "erikhofer",
|
||||
"name": "electron-publish-example"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
"homepage": "https://github.com/smartfrigde/armcord#readme"
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
const { remote } = require("electron");
|
||||
const currentWindow = remote.getCurrentWindow();
|
||||
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", () => {
|
||||
|
@ -9,7 +10,6 @@ window.addEventListener("DOMContentLoaded", () => {
|
|||
menu: false,
|
||||
});
|
||||
|
||||
const currentWindow = remote.getCurrentWindow();
|
||||
electronLocalshortcut.register(currentWindow, "F5", () => {
|
||||
location.reload();
|
||||
});
|
||||
|
@ -23,7 +23,7 @@ window.addEventListener("DOMContentLoaded", () => {
|
|||
window.location.href = "/invite/F25bc4RYDt";
|
||||
});
|
||||
electronLocalshortcut.register(currentWindow, "F4", () => {
|
||||
currentWindow.loadFile("./manager.html")
|
||||
currentWindow.loadFile("./manager.html");
|
||||
});
|
||||
require("./utils/capturer.js");
|
||||
|
||||
|
@ -94,5 +94,4 @@ div.menubar[role="menubar"] {
|
|||
);
|
||||
|
||||
document.getElementById("ac-channel").innerHTML = ArmCord.Channel;
|
||||
|
||||
});
|
||||
|
|
15
utils/csp.js
Normal file
15
utils/csp.js
Normal file
|
@ -0,0 +1,15 @@
|
|||
const { session } = require("electron");
|
||||
|
||||
session.defaultSession.webRequest.onHeadersReceived.addListener(
|
||||
(h) => {
|
||||
h.responseHeaders.forEach((e, i) => {
|
||||
if (e.name.toLowerCase() === "content-security-policy") {
|
||||
e.value = "";
|
||||
}
|
||||
});
|
||||
return { responseHeaders: h.responseHeaders };
|
||||
},
|
||||
{ urls: ["*://*.discord.com/*"] },
|
||||
["blocking", "responseHeaders"]
|
||||
);
|
||||
//csp thingz
|
|
@ -11,7 +11,7 @@ fs.readdirSync(pluginFolder).forEach((file) => {
|
|||
);
|
||||
var pluginFile = JSON.parse(manifest);
|
||||
console.log(pluginFile);
|
||||
session.defaultSession.loadExtension(`${__dirname}/plugins/${file}/`);
|
||||
session.defaultSession.loadExtension(`${__dirname}\\plugins\\${file}`);
|
||||
console.log(
|
||||
`%cLoaded ${pluginFile.name} made by ${pluginFile.author}`,
|
||||
"color:red"
|
||||
|
|
Loading…
Reference in a new issue