2.0 - Rewrite
This commit is contained in:
smartfridge 2021-05-01 15:13:52 +02:00 committed by GitHub
commit 015d11702a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 4279 additions and 3724 deletions

2
.gitattributes vendored Normal file
View File

@ -0,0 +1,2 @@
# Auto detect text files and perform LF normalization
* text=auto

9
.github/dependabot.yml vendored Normal file
View File

@ -0,0 +1,9 @@
version: 2
updates:
- package-ecosystem: npm
directory: "/"
schedule:
interval: daily
time: "13:00"
open-pull-requests-limit: 99
versioning-strategy: increase

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
node_modules

View File

@ -1,10 +1,13 @@
# armcord
Armcord is Discord client for Arm Linux. Goal of the project is to bring custom discord version of app to arm. It uses GooseMod for themes and plugins. This will work on normal x86 if you really want it to work.
# Dependencies:
Armcord is a custom Discord client for ARM Linux. It's goal is to bring a custom Discord client to ARM Architecture. It uses [GooseMod](https://goosemod.com) for custom themes and plugins!
# To run this you need:
nodejs, npm
# How to run/install it?
On first install just do `./install.sh` and it will install needed modules, after that start client with `npm start`
1.Run `npm install`
2.Run `npm start`
Alternative: Download pre-compiled version from releases tab.
# FAQ
1.Will I get banned from using it?
**-You are breaking Discord ToS because this is using GooseMod for themes and plugins but if you don't do anything bad you will not get banned.**
**-You are breaking Discord ToS since we are using GooseMod for themes and plugins. But no one ever got banned from using ArmCord or GooseMod**

View File

@ -1,19 +1,40 @@
<!DOCTYPE html>
<html>
<html lang="en">
<head>
<meta charset="UTF-8">
<!-- https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP -->
<meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self'">
<meta http-equiv="X-Content-Security-Policy" content="default-src 'self'; script-src 'self'">
<meta charset="UTF-8" />
<meta http-equiv="refresh" content="5; URL=https://discord.com/app" />
<title>ArmCord</title>
<meta http-equiv="refresh" content="0; url=http://discord.com/app" />
<style>
:root {
font-family: Arial, Helvetica, sans-serif;
}
.titlebar {
font-family: Verdana, Geneva, Tahoma, sans-serif;
background-color: #2C2F33;
}
body {
color: white;
}
h1 {
color: white;
}
h1 {
text-align: center;
}
span {
text-align: center;
}
</style>
<style>
body {
background-color: #2c2f33;
}
</style>
</head>
<body>
<h1>Hello World!</h1>
<h1>Redirecting you to Discord...</h1>
<h1>If you are stuck on this page check your internet connection!</h1>
<!-- You can also require other files to run in this process -->
<script src="./renderer.js"></script>
<h1>ArmCord</h1>
<h1>Discord will load in few seconds.</h1>
</body>
</html>

View File

@ -1,2 +0,0 @@
npm install
npm start

25
main.js
View File

@ -1,24 +1,29 @@
// Modules to control application life and create native browser window
const {app, BrowserWindow, session} = require('electron')
const { app, BrowserWindow, session } = require('electron')
const path = require('path')
require('v8-compile-cache');
require("v8-compile-cache");
let mainWindow
function createWindow () {
// Create the browser window.
const mainWindow = new BrowserWindow({
function createWindow() {
mainWindow = new BrowserWindow({
width: 800,
height: 600,
frame: false,
webPreferences: {
preload: path.join(__dirname, 'preload.js')
preload: path.join(__dirname, 'preload.js'),
enableRemoteModule: true,
nodeIntegration: false,
}
})
// and load the index.html of the app.
mainWindow.loadFile('index.html')
// Open the DevTools.
// mainWindow.webContents.openDevTools()
mainWindow.on('closed', () => {
mainWindow = null
})
}
// This method will be called when Electron has finished
@ -41,7 +46,3 @@ app.whenReady().then(() => {
app.on('window-all-closed', function () {
if (process.platform !== 'darwin') app.quit()
})
// In this file you can include the rest of your app's specific main process
// code. You can also put them in separate files and require them here.

7800
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,69 +1,35 @@
{
"name": "armcord",
"version": "1.0.0",
"description": "A minimal Electron application",
"version": "2.0.0",
"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",
"package": "electron-forge package",
"make": "electron-forge make"
"start": "electron .",
"dist": "electron-builder",
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "smartfrigde",
"license": "MIT",
"dependencies": {
"custom-electron-titlebar": "3.2.5",
"v8-compile-cache": "^2.3.0"
},
"devDependencies": {
"electron": "latest",
"electron-builder": "latest",
"electron-packager": "latest"
},
"repository": {
"type": "git",
"url": "git+https://github.com/electron/electron-quick-start.git"
"url": "git+https://github.com/smartfrigde/armcord.git"
},
"keywords": [
"Electron",
"quick",
"start",
"tutorial",
"demo"
"arm",
"discord",
"electron"
],
"author": "GitHub",
"license": "MIT",
"devDependencies": {
"@electron-forge/cli": "^6.0.0-beta.54",
"@electron-forge/maker-deb": "^6.0.0-beta.54",
"@electron-forge/maker-rpm": "^6.0.0-beta.54",
"@electron-forge/maker-squirrel": "^6.0.0-beta.54",
"@electron-forge/maker-zip": "^6.0.0-beta.54",
"electron": "^12.0.0"
},
"bugs": {
"url": "https://github.com/electron/electron-quick-start/issues"
"url": "https://github.com/smartfrigde/armcord/issues"
},
"homepage": "https://github.com/electron/electron-quick-start#readme",
"dependencies": {
"electron-squirrel-startup": "^1.0.0",
"rpmbuild": "0.0.23",
"v8-compile-cache": "^2.3.0",
"yarn": "^1.22.10"
},
"config": {
"forge": {
"packagerConfig": {},
"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": {}
}
]
}
}
"homepage": "https://github.com/smartfrigde/armcord#readme"
}

View File

@ -1,19 +1,9 @@
// All of the Node.js APIs are available in the preload process.
// It has the same sandbox as a Chrome extension.
window.addEventListener('DOMContentLoaded', () => {
const replaceText = (selector, text) => {
const element = document.getElementById(selector)
if (element) element.innerText = text
}
const customTitlebar = require('custom-electron-titlebar')
window.addEventListener('DOMContentLoaded', () => {
new customTitlebar.Titlebar({
backgroundColor: customTitlebar.Color.fromHex("#2C2F33"),
});
for (const type of ['chrome', 'node', 'electron']) {
replaceText(`${type}-version`, process.versions[type])
}
})
style = document.createElement("style");
document.head.appendChild(style);
style.appendChild(
document.createTextNode(
`@import url("https://smartfrigde.github.io/smartcord/custom.css")`
)
);

View File

@ -1,6 +0,0 @@
// This file is required by the index.html file and will
// be executed in the renderer process for that window.
// No Node.js APIs are available in this process because
// `nodeIntegration` is turned off. Use `preload.js` to
// selectively enable features needed in the rendering
// process.