Compare commits

..

79 commits

Author SHA1 Message Date
smartfridge
64b0f6eeba v2.5.0 2021-07-17 17:55:10 +02:00
smartfridge
f8c4e139fc Merge branch 'main' of https://github.com/smartfrigde/armcord 2021-07-17 17:44:23 +02:00
smartfridge
12df5e6b09 v2.5.0 2021-07-17 17:43:37 +02:00
smartfridge
ae926c6548
Update build.yml 2021-07-17 17:43:09 +02:00
smartfridge
0df9689bd1 Add option to use native titlebar 2021-07-17 17:33:21 +02:00
smartfridge
e7ae65bfbb Theme Manager Stuff 2021-07-17 17:25:25 +02:00
smartfridge
f7a1d23f70
Merge pull request #47 from smartfrigde/canary
2.5.0 Release
2021-07-17 17:24:19 +02:00
smartfridge
67f2bfeebd
Merge branch 'main' into canary 2021-07-17 17:23:06 +02:00
smartfridge
df571930cf updates 2021-07-15 15:45:56 +02:00
smartfridge
c76cf4f6cf Update versions and license in package.json 2021-07-14 18:48:23 +02:00
smartfridge
d2dcb69d38 Remove unused csp.js 2021-07-14 18:46:55 +02:00
smartfridge
5b9e1c13c0 Remove update.rocks updater 2021-07-14 18:46:25 +02:00
smartfridge
6df4446369 Update build script for easier development on Linux 2021-07-14 18:45:57 +02:00
smartfridge
57c40ffa4f Remove additional logging from plugin/theme loading, fix one grammar mistake 2021-07-14 18:45:36 +02:00
smartfridge
3f7cade6f2 Update build.yml 2021-07-01 11:40:37 +02:00
smartfridge
e72293285b Correct freedesktop category 2021-07-01 11:28:06 +02:00
smartfridge
f4167736a0 I'm stupid 2021-07-01 11:23:33 +02:00
smartfridge
d21c95008c Add email because Bill Gates told me to do so 2021-07-01 11:19:39 +02:00
smartfridge
247eda7c59 Linux Build test 2021-06-30 21:16:05 +02:00
smartfridge
2f77ec2f56 Merge branch 'canary' of https://github.com/smartfrigde/armcord into canary 2021-06-30 17:00:51 +02:00
smartfridge
3da0191a73 Update build.yml 2021-06-30 17:00:49 +02:00
KayoticCarnige
22013310d9 Update manager.css 2021-06-30 10:53:43 -04:00
smartfridge
f05508d440 valid yaml pls 2021-06-30 16:50:00 +02:00
smartfridge
96e6faa8bd Valid yaml? 2021-06-30 16:48:57 +02:00
smartfridge
1107db1545 Update build.yml 2021-06-30 16:45:40 +02:00
smartfridge
bf4f0e4a5b v2.5.0-TESTING 2021-06-30 16:15:57 +02:00
smartfridge
acac9eba66 Merge branch 'canary' of https://github.com/smartfrigde/armcord into canary 2021-06-30 16:14:46 +02:00
smartfridge
f61106aa0b Revert User Agent 2021-06-30 16:14:44 +02:00
smartfridge
630447905c
Add files via upload 2021-06-30 16:09:32 +02:00
smartfridge
07a6c12255
Delete icon.png 2021-06-30 16:09:18 +02:00
smartfridge
dfc6995064 Workflows fix + don't default to non-asar build 2021-06-30 15:59:18 +02:00
smartfridge
847cb9c2c8 Plugin install warning + fixed workflows? 2021-06-30 15:40:19 +02:00
smartfridge
0aa6e1399c Re-do plugin/theme loading. Move plugins/themes to userdata 2021-06-30 14:42:36 +02:00
smartfridge
1d84e24825 the shit is broken + new building system 2021-06-29 17:23:52 +02:00
smartfridge
fdabb6b4de Update content.js 2021-06-29 15:41:17 +02:00
smartfridge
27c95da82f Update packages 2021-06-26 21:42:14 +02:00
smartfridge
ec065a05c7 remove bloat 2021-06-26 21:02:50 +02:00
smartfridge
427eb51aa5 "your bad extension, not me" 2021-06-26 20:59:17 +02:00
KayoticCarnige
adece2efc9 Added channels (settings.json) 2021-05-28 12:00:30 -04:00
KayoticCarnige
253ff66cc3 Added Theme Folder Button 2021-05-25 06:24:42 -04:00
KayoticCarnige
21435ca167 Merge branch 'canary' of https://github.com/smartfrigde/armcord into canary 2021-05-23 18:32:44 -04:00
smartfridge
e4b54dda05
cors my beloved <3 2021-05-22 23:21:07 +02:00
KayoticCarnige
dccf461fc3 Update package.json 2021-05-22 12:03:48 -04:00
smartfridge
70e8a95a50
Fix Linux file naming or something 2021-05-22 17:29:39 +02:00
KayoticCarnige
493c35d269 Update preload.js 2021-05-22 11:28:29 -04:00
KayoticCarnige
024e37e5d0 Update main.js 2021-05-22 11:03:32 -04:00
KayoticCarnige
cdf8ed4ba7 Fixed UI and added a test theme :p 2021-05-22 08:39:46 -04:00
smartfridge
9145f8f233
Fix imports on Linux 2021-05-21 21:36:13 +02:00
smartfridge
1307123fd8 ArmCord Manager 1 2021-05-21 20:19:17 +02:00
smartfridge
51beca4d2f armcord manager the 2021-05-21 19:33:11 +02:00
smartfridge
5e10467bf7 Fix theme loading 2021-05-21 19:27:32 +02:00
smartfridge
9985c8cabe
Update LICENSE 2021-05-21 19:20:30 +02:00
smartfridge
0d7a68c713 amongus broke my discord :( 2021-05-20 18:42:16 +02:00
smartfridge
3461a997df fuck depandabot all my homies hate dependabot 2021-05-20 18:27:04 +02:00
smartfridge
2b6544bb2c
Merge pull request #23 from smartfrigde/dependabot/npm_and_yarn/electron-forge/cli-6.0.0-beta.55
Bump @electron-forge/cli from 6.0.0-beta.54 to 6.0.0-beta.55
2021-05-20 18:15:18 +02:00
smartfridge
8c29a67854
Merge pull request #24 from smartfrigde/dependabot/npm_and_yarn/electron-context-menu-3.1.0
Bump electron-context-menu from 3.0.0 to 3.1.0
2021-05-20 18:14:30 +02:00
smartfridge
70949d8414
Merge branch 'canary' into dependabot/npm_and_yarn/electron-context-menu-3.1.0 2021-05-20 18:13:52 +02:00
smartfridge
ae44bad4b1
Merge pull request #25 from smartfrigde/dependabot/npm_and_yarn/electron-12.0.9
Bump electron from 12.0.6 to 12.0.9
2021-05-20 18:12:54 +02:00
smartfridge
8532a7742e
Merge branch 'canary' into dependabot/npm_and_yarn/electron-12.0.9 2021-05-20 18:12:47 +02:00
dependabot[bot]
2faf59b43e
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] <support@github.com>
2021-05-20 16:11:38 +00:00
KayoticCarnige
df83567d99 Fixed up the theme menu CSS and removed "Download Discord" popup 2021-05-20 12:00:51 -04:00
dependabot[bot]
d405b89fa9
Bump electron-context-menu from 3.0.0 to 3.1.0
Bumps [electron-context-menu](https://github.com/sindresorhus/electron-context-menu) from 3.0.0 to 3.1.0.
- [Release notes](https://github.com/sindresorhus/electron-context-menu/releases)
- [Commits](https://github.com/sindresorhus/electron-context-menu/compare/v3.0.0...v3.1.0)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-18 13:10:21 +00:00
dependabot[bot]
a348117cb2
Bump @electron-forge/cli from 6.0.0-beta.54 to 6.0.0-beta.55
Bumps [@electron-forge/cli](https://github.com/electron-userland/electron-forge) from 6.0.0-beta.54 to 6.0.0-beta.55.
- [Release notes](https://github.com/electron-userland/electron-forge/releases)
- [Changelog](https://github.com/electron-userland/electron-forge/blob/master/CHANGELOG.md)
- [Commits](https://github.com/electron-userland/electron-forge/compare/v6.0.0-beta.54...v6.0.0-beta.55)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-18 13:10:14 +00:00
smartfridge
7fe38ad307 remove remote in require thing since it's not used 2021-05-16 16:31:20 +02:00
smartfridge
22f8ea1123 Plugin Loading 2021-05-16 16:29:37 +02:00
smartfridge
8cdd7e15b7 fix typo 2021-05-16 13:08:20 +02:00
smartfridge
0c7b7af2b3 SCSS warning that doesn't work :godmode: 2021-05-15 16:20:57 +02:00
smartfridge
f03642e51e Themes loading tweaks + Revert Brand ported theme 2021-05-15 12:53:27 +02:00
smartfridge
45d8b89c9e Some tweaks to theme loading 2021-05-15 12:35:22 +02:00
smartfridge
6232c01006 Partial Powercord Theme Support 2021-05-14 22:54:40 +02:00
smartfridge
8d3b5f523a i have no idea what i am doing 2021-05-14 21:47:01 +02:00
smartfridge
41306d6cde Add barebones theme loading! 2021-05-14 20:27:59 +02:00
smartfridge
9608851fa2 Theme Manager test 2021-05-14 18:01:52 +02:00
smartfridge
38edef38ee Add shortcut to theme manager and make base for it 2021-05-14 17:35:25 +02:00
smartfridge
7dab560a99 Create theme.html 2021-05-14 17:17:39 +02:00
smartfridge
3b35a9f888 Bump version and remove vulnerabilities (npm audit fix) 2021-05-14 17:03:08 +02:00
smartfridge
d5012e79a1 Bump version 2021-05-14 17:00:00 +02:00
smartfridge
522ffa9ea0 Tweak electon-forge config 2021-05-14 16:59:42 +02:00
smartfridge
f887513e09 Follow Discord tray behaviour 2021-05-10 16:35:07 +02:00
22 changed files with 3805 additions and 9712 deletions

View file

@ -1,39 +1,37 @@
name: Build
on: [push, pull_request]
name: Build/release
on: push
jobs:
build_on_linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@master
with:
node-version: 14
- name: install dependencies
run: npm install
- name: build
run: npm run make
release:
runs-on: ${{ matrix.os }}
build_on_mac:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@master
with:
node-version: 14
- name: install dependencies
run: npm install
- name: build
run: npm run make
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
build_on_win:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@master
with:
node-version: 14
- name: install dependencies
run: npm install
- name: build
run: npm run make
- name: Check out Git repository
uses: actions/checkout@v1
- name: Install Node.js, NPM and Yarn
uses: actions/setup-node@v1
with:
node-version: 16
- name: Build/release Electron app
uses: samuelmeuli/action-electron-builder@v1
with:
# GitHub token, automatically provided to the action
# (No need to define this secret in the repo settings)
github_token: ${{ secrets.github_token }}
# skip npm run build as there's no script like that
skip_build: true
# If the commit is tagged with a version (e.g. "v1.0.0"),
# release the app after building
release: ${{ startsWith(github.ref, 'refs/tags/v') }} #disabled for now as it caused problems (nvm)
- name: Archive production builds
uses: actions/upload-artifact@v2
with:
name: dist folder
path: dist/**

185
LICENSE
View file

@ -1,21 +1,172 @@
MIT License
Open Software License ("OSL") v. 3.0
Copyright (c) 2021 smartfridge
This Open Software License (the "License") applies to any original work of
authorship (the "Original Work") whose owner (the "Licensor") has placed the
following licensing notice adjacent to the copyright notice for the Original
Work:
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:
Licensed under the Open Software License version 3.0
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
1) Grant of Copyright License. Licensor grants You a worldwide, royalty-free,
non-exclusive, sublicensable license, for the duration of the copyright, to do
the following:
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.
a) to reproduce the Original Work in copies, either alone or as part of a
collective work;
b) to translate, adapt, alter, transform, modify, or arrange the Original
Work, thereby creating derivative works ("Derivative Works") based upon the
Original Work;
c) to distribute or communicate copies of the Original Work and Derivative
Works to the public, with the proviso that copies of Original Work or
Derivative Works that You distribute or communicate shall be licensed under
this Open Software License;
d) to perform the Original Work publicly; and
e) to display the Original Work publicly.
2) Grant of Patent License. Licensor grants You a worldwide, royalty-free,
non-exclusive, sublicensable license, under patent claims owned or controlled
by the Licensor that are embodied in the Original Work as furnished by the
Licensor, for the duration of the patents, to make, use, sell, offer for sale,
have made, and import the Original Work and Derivative Works.
3) Grant of Source Code License. The term "Source Code" means the preferred
form of the Original Work for making modifications to it and all available
documentation describing how to modify the Original Work. Licensor agrees to
provide a machine-readable copy of the Source Code of the Original Work along
with each copy of the Original Work that Licensor distributes. Licensor
reserves the right to satisfy this obligation by placing a machine-readable
copy of the Source Code in an information repository reasonably calculated to
permit inexpensive and convenient access by You for as long as Licensor
continues to distribute the Original Work.
4) Exclusions From License Grant. Neither the names of Licensor, nor the names
of any contributors to the Original Work, nor any of their trademarks or
service marks, may be used to endorse or promote products derived from this
Original Work without express prior permission of the Licensor. Except as
expressly stated herein, nothing in this License grants any license to
Licensor's trademarks, copyrights, patents, trade secrets or any other
intellectual property. No patent license is granted to make, use, sell, offer
for sale, have made, or import embodiments of any patent claims other than the
licensed claims defined in Section 2. No license is granted to the trademarks
of Licensor even if such marks are included in the Original Work. Nothing in
this License shall be interpreted to prohibit Licensor from licensing under
terms different from this License any Original Work that Licensor otherwise
would have a right to license.
5) External Deployment. The term "External Deployment" means the use,
distribution, or communication of the Original Work or Derivative Works in any
way such that the Original Work or Derivative Works may be used by anyone
other than You, whether those works are distributed or communicated to those
persons or made available as an application intended for use over a network.
As an express condition for the grants of license hereunder, You must treat
any External Deployment by You of the Original Work or a Derivative Work as a
distribution under section 1(c).
6) Attribution Rights. You must retain, in the Source Code of any Derivative
Works that You create, all copyright, patent, or trademark notices from the
Source Code of the Original Work, as well as any notices of licensing and any
descriptive text identified therein as an "Attribution Notice." You must cause
the Source Code for any Derivative Works that You create to carry a prominent
Attribution Notice reasonably calculated to inform recipients that You have
modified the Original Work.
7) Warranty of Provenance and Disclaimer of Warranty. Licensor warrants that
the copyright in and to the Original Work and the patent rights granted herein
by Licensor are owned by the Licensor or are sublicensed to You under the
terms of this License with the permission of the contributor(s) of those
copyrights and patent rights. Except as expressly stated in the immediately
preceding sentence, the Original Work is provided under this License on an "AS
IS" BASIS and WITHOUT WARRANTY, either express or implied, including, without
limitation, the warranties of non-infringement, merchantability or fitness for
a particular purpose. THE ENTIRE RISK AS TO THE QUALITY OF THE ORIGINAL WORK
IS WITH YOU. This DISCLAIMER OF WARRANTY constitutes an essential part of this
License. No license to the Original Work is granted by this License except
under this disclaimer.
8) Limitation of Liability. Under no circumstances and under no legal theory,
whether in tort (including negligence), contract, or otherwise, shall the
Licensor be liable to anyone for any indirect, special, incidental, or
consequential damages of any character arising as a result of this License or
the use of the Original Work including, without limitation, damages for loss
of goodwill, work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses. This limitation of liability shall not
apply to the extent applicable law prohibits such limitation.
9) Acceptance and Termination. If, at any time, You expressly assented to this
License, that assent indicates your clear and irrevocable acceptance of this
License and all of its terms and conditions. If You distribute or communicate
copies of the Original Work or a Derivative Work, You must make a reasonable
effort under the circumstances to obtain the express assent of recipients to
the terms of this License. This License conditions your rights to undertake
the activities listed in Section 1, including your right to create Derivative
Works based upon the Original Work, and doing so without honoring these terms
and conditions is prohibited by copyright law and international treaty.
Nothing in this License is intended to affect copyright exceptions and
limitations (including "fair use" or "fair dealing"). This License shall
terminate immediately and You may no longer exercise any of the rights granted
to You by this License upon your failure to honor the conditions in Section
1(c).
10) Termination for Patent Action. This License shall terminate automatically
and You may no longer exercise any of the rights granted to You by this
License as of the date You commence an action, including a cross-claim or
counterclaim, against Licensor or any licensee alleging that the Original Work
infringes a patent. This termination provision shall not apply for an action
alleging patent infringement by combinations of the Original Work with other
software or hardware.
11) Jurisdiction, Venue and Governing Law. Any action or suit relating to this
License may be brought only in the courts of a jurisdiction wherein the
Licensor resides or in which Licensor conducts its primary business, and under
the laws of that jurisdiction excluding its conflict-of-law provisions. The
application of the United Nations Convention on Contracts for the
International Sale of Goods is expressly excluded. Any use of the Original
Work outside the scope of this License or after its termination shall be
subject to the requirements and penalties of copyright or patent law in the
appropriate jurisdiction. This section shall survive the termination of this
License.
12) Attorneys' Fees. In any action to enforce the terms of this License or
seeking damages relating thereto, the prevailing party shall be entitled to
recover its costs and expenses, including, without limitation, reasonable
attorneys' fees and costs incurred in connection with such action, including
any appeal of such action. This section shall survive the termination of this
License.
13) Miscellaneous. If any provision of this License is held to be
unenforceable, such provision shall be reformed only to the extent necessary
to make it enforceable.
14) Definition of "You" in This License. "You" throughout this License,
whether in upper or lower case, means an individual or a legal entity
exercising rights under, and complying with all of the terms of, this License.
For legal entities, "You" includes any entity that controls, is controlled by,
or is under common control with you. For purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the direction or
management of such entity, whether by contract or otherwise, or (ii) ownership
of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial
ownership of such entity.
15) Right to Use. You may use the Original Work in all ways not otherwise
restricted or conditioned by this License or by law, and Licensor promises not
to interfere with or be responsible for such uses by You.
16) Modification of This License. This License is Copyright © 2005 Lawrence
Rosen. Permission is granted to copy, distribute, or communicate this License
without modification. Nothing in this License permits You to modify this
License as applied to the Original Work or to Derivative Works. However, You
may modify the text of this License and copy, distribute or communicate your
modified version (the "Modified License") and apply it to other original works
of authorship subject to the following conditions: (i) You may not indicate in
any way that your Modified License is the "Open Software License" or "OSL" and
you may not use those names in the name of your Modified License; (ii) You
must replace the notice specified in the first paragraph above with the notice
"Licensed under <insert your license name here>" or with a notice of your own
that is not confusingly similar to the notice in this License; and (iii) You
may not claim that your original works are open source software unless your
Modified License has been approved by Open Source Initiative (OSI) and You
comply with its license review and certification process.

View file

@ -25,7 +25,7 @@ Alternative (npm, nodejs required):
# Credits
[ArmCord UI Elements and few features](https://github.com/kckarnige)
[GooseMod](https://github.com/GooseMod/GooseMod)
[GooseMod-Chrome](https://github.com/AAGaming00/GooseMod-chrome)
[GooseMod Extension](https://github.com/GooseMod/extension)
[update.rocks](https://www.update.rocks)
[electron-discord-webapp](https://github.com/SpacingBat3/electron-discord-webapp)
[custom-electron-titlebar](https://github.com/AlexTorresSk/custom-electron-titlebar)

4
build.sh Normal file → Executable file
View file

@ -1,2 +1,2 @@
npm i
npm run make
npm run package
./dist/linux-unpacked/armcord

BIN
build/icon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 361 KiB

BIN
build/icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 423 KiB

View file

@ -1,10 +0,0 @@
chrome.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']
)

View file

@ -1,21 +0,0 @@
The MIT License (MIT)
Copyright (c) 2020 AAGaming00
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.

View file

@ -1,5 +0,0 @@
const scr = document.createElement('script');
scr.src = 'https://goosemod-api.netlify.app/untethered/untetheredInject.js';
document.head.appendChild(scr);

View file

@ -1,22 +0,0 @@
{
"name": "GooseMod",
"version": "1.0",
"description": "Loads GooseMod, a discord client modification",
"background": {
"scripts": [
"CSP.js"
]
},
"content_scripts": [
{
"matches": ["*://*.discord.com/*"],
"js": ["gm.js"]
}
],
"permissions": [
"webRequest",
"webRequestBlocking",
"*://*.discord.com/*"
],
"manifest_version": 2
}

View file

@ -3,8 +3,22 @@
<head>
<meta charset="UTF-8" />
<meta http-equiv="refresh" content="5; URL=https://discord.com/app" />
<title>ArmCord</title>
<script>
window.onload = setTimeout(function() {
if (document.getElementById("ac-channel").innerHTML == "stable") {
window.location.href = "https://discord.com/app";
} else if (document.getElementById("ac-channel").innerHTML == "canary") {
window.location.href = "https://canary.discord.com/app";
} else if (document.getElementById("ac-channel").innerHTML == "ptb") {
window.location.href = "https://ptb.discord.com/app";
} else if (document.getElementById("ac-channel").innerHTML == "foss") {
window.location.href = "https://dev.fosscord.com/app";
} else {
window.location.href = "https://discord.com/app";
};
}, 3000);
</script>
<style>
@import url("https://kckarnige.github.io/femboi_owo/discord-font.css");
@ -71,6 +85,10 @@
color: #fff;
transform: translate(-50%, -50%);
}
#ac-channel {
display: none;
}
</style>
<style>
@ -84,6 +102,7 @@
</video>
<p>Loading...</p>
<h1></h1>
<p id="ac-channel"></p>
</div>
</body>

20
main.js
View file

@ -4,7 +4,11 @@ const path = require("path");
const contextMenu = require("electron-context-menu");
const os = require("os");
require("v8-compile-cache");
require("./utils/updater");
if (require("./utils/ArmCord.js").Titlebar === "native") {
var frame = true
} else {
var frame = false
}
if (os.type() == 'Linux'){
var iconformat = __dirname + "/discord.png"
@ -31,7 +35,7 @@ function createWindow() {
height: 600,
icon: iconformat,
title: "ArmCord",
frame: false,
frame: frame,
webPreferences: {
preload: path.join(__dirname, "preload.js"),
enableRemoteModule: true,
@ -41,7 +45,7 @@ function createWindow() {
var appIcon = new Tray(iconformat);
mainWindow.webContents.userAgent =
"Mozilla/5.0 (X12; FreeBSD x86) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36"; //fake useragent
"Mozilla/5.0 (X12; Linux x86) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36"; //fake useragent
mainWindow.loadFile("index.html");
mainWindow.focus();
mainWindow.webContents.on("new-window", function (e, url) {
@ -73,6 +77,9 @@ function createWindow() {
},
},
]);
appIcon.on("click", () => {
mainWindow.show()
});
appIcon.setContextMenu(contextMenu);
@ -87,7 +94,7 @@ function createWindow() {
try {
appIcon();
} catch (error) {
console.error(error);
//console.error(error);
// expected output: TypeError: appIcon is not a function
}
});
@ -98,9 +105,8 @@ 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/csp.js");
require("./utils/plugin.js");
session
.fromPartition("some-partition")
.setPermissionRequestHandler((webContents, permission, callback) => {

161
manager.css Normal file
View file

@ -0,0 +1,161 @@
@import url("https://kckarnige.github.io/femboi_owo/discord-font.css");
:root {
background-color: #2f3136;
user-select: none;
--header-secondary: #b9bbbe;
--header-primary: #fff;
--background-tertiary: #202225;
}
body {
color: white;
}
h1 {
font-size: 0;
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;
}
.disabled {
text-align: center;
font-weight: normal;
font-family: Helvetica, sans-serif;
}
.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;
left: 0;
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;
}
button#open-themes-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-right: 5px;
right: 0;
text-align: center;
border-style: none;
outline: none;
}
button#open-themes-btn:hover {
background-color: #687dc6;
border-style: none;
outline: none;
cursor: pointer;
}
button#open-themes-btn:active {
background-color: #5c6fb1;
}
#tm-list {
position: absolute;
top: 100px;
left: 50%;
transform: translateX(-50%);
}
#tm-disabled {
position: absolute;
top: 100px;
left: 50%;
transform: translateX(-50%);
}
#tm-list-item {
background: #23272a;
font-family: Whitney, Helvetica Neue, Helvetica, Arial, sans-serif;
width: 100%;
border-radius: 5px;
padding: 10px 10px 18px;
width: 420px;
max-width: 820px;
}
#theme-name {
color: #7289da;
font-weight: 400;
font-size: 20px;
}
#theme-author {
color: #99aab5;
font-size: 12px;
}
#theme-description {
color: #b9bbbe;
font-size: 15px;
position: relative;
top: 8px;
width: 75%;
}
#ac-channel {
display: none;
}
::-webkit-scrollbar {
width: 0.4em;
background: transparent;
}
::-webkit-scrollbar-thumb {
background: #202225;
border-radius: 25px;
}

18
manager.html Normal file
View file

@ -0,0 +1,18 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>ArmCord Manager</title>
<link rel="stylesheet" href="manager.css">
</head>
<body>
<button class="back-btn">Back to Discord</button>
<button id="open-themes-btn">Themes Folder</button>
<p class="logo">Cord Manager</p>
<div id="tm-list"></div>
<p class="disabled">Disabled Themes:</p>
<div id="tm-disabled"></div>
<p id="ac-channel"></p>
</body>
</html>

12614
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -1,33 +1,29 @@
{
"name": "armcord",
"name": "ArmCord",
"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": {
"start": "electron-forge start",
"dist": "electron-builder",
"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",
"author": "smartfrigde <smartfridge1337@protonmail.com>",
"license": "OSL-3.0",
"dependencies": {
"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",
"unzipper": "^0.10.1",
"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,47 +34,25 @@
"discord",
"electron"
],
"bugs": {
"url": "https://github.com/smartfrigde/armcord/issues"
},
"homepage": "https://github.com/smartfrigde/armcord#readme",
"config": {
"forge": {
"packagerConfig": {},
"makers": [
{
"name": "@electron-forge/maker-squirrel",
"config": {
"name": "armcord"
}
},
{
"name": "@electron-forge/maker-zip",
"platforms": [
"darwin",
"linux"
]
},
{
"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"
}
}
}
"build": {
"appId": "com.smartfridge.armcord",
"productName": "ArmCord",
"mac": {
"category": "Network"
},
"linux": {
"maintainer": "smartfridge1337@protonmail.com",
"target": [
"deb",
"tar.gz",
"rpm",
"AppImage"
]
}
}
},
"bugs": {
"url": "https://github.com/smartfrigde/armcord/issues",
"email": "smartfridge1337@protonmail.com"
},
"homepage": "https://github.com/smartfrigde/armcord#readme"
}

View file

@ -1,15 +1,16 @@
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", () => {
if (require("./utils/ArmCord.js").Titlebar === "native") {console.log("Using native titlebar")} else {
new customTitlebar.Titlebar({
backgroundColor: customTitlebar.Color.fromHex("#202225"),
menu: false,
});
const currentWindow = remote.getCurrentWindow();
});}
electronLocalshortcut.register(currentWindow, "F5", () => {
location.reload();
});
@ -20,7 +21,10 @@ window.addEventListener("DOMContentLoaded", () => {
require("shell").openExternal("https://support.discord.com/");
});
electronLocalshortcut.register(currentWindow, "F2", () => {
window.location.href = "https://discord.com/invite/F25bc4RYDt";
window.location.href = "/invite/F25bc4RYDt";
});
electronLocalshortcut.register(currentWindow, "F4", () => {
currentWindow.loadFile("./manager.html");
});
require("./utils/capturer.js");
@ -30,6 +34,7 @@ window.addEventListener("DOMContentLoaded", () => {
--window-buttons: var(--header-secondary);
--cord-color: var(--header-primary);
--armcord-color: #7289da;
--titlebar-color: var(--background-tertiary);
}
.base-3dtUhz, .sidebar-2K8pFh {
display: -webkit-box;
@ -61,15 +66,18 @@ div.menubar[role="menubar"] {
.window-title {
font-size: 0px !important;
margin-left: initial !important;
transform: translate(10px, 2px) !important;
transform: translate(10px, 2px);
}
.titlebar {
background: var(--background-tertiary) !important;
background: var(--titlebar-color) !important;
font-family: Verdana, Geneva, Tahoma, sans-serif;
}
.titlebar .window-controls-container .window-icon {
background: var(--window-buttons) !important;
}
.notice-3bPHh-.colorDefault-22HBa0 {
display: none;
}
`);
ArmCord.addStyle(
@ -85,4 +93,6 @@ div.menubar[role="menubar"] {
text-transform: none;
}`
);
document.getElementById("ac-channel").innerHTML = ArmCord.Channel;
});

View file

@ -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');
}
}
}

View file

@ -1,5 +1,16 @@
exports.Version = require("../package.json").version;
const fs = require("fs");
const electron = require("electron");
const userDataPath = (electron.app || electron.remote.app).getPath("userData");
const settingsFile= userDataPath + "/settings.json";
if (!fs.existsSync(settingsFile)) {
fs.writeFile(settingsFile, "{}", (err) => {
if (err) throw err;
});
console.log("Created settings.json file");
}
exports.Channel = require(settingsFile).channel;
exports.Titlebar = require(settingsFile).titlebar;
exports.addStyle = function(styleString) {
const style = document.createElement('style');
style.textContent = styleString;

67
utils/plugin.js Normal file
View file

@ -0,0 +1,67 @@
const fs = require("fs");
const { app, session } = require("electron");
const electron = require("electron");
const userDataPath = (electron.app || electron.remote.app).getPath("userData");
const pluginFolder = userDataPath + "/plugins/";
if (!fs.existsSync(pluginFolder)) {
fs.mkdirSync(pluginFolder);
console.log("Created plugin folder")
try {
console.log("Attempting to download GooseMod Extension")
const https = require("https");
function download(url, dest, cb) {
const file = fs.createWriteStream(dest);
const request = https
.get(url, function (response) {
response.pipe(file);
file.on("finish", function () {
file.close(cb); // close() is async, call cb after close completes.
});
})
.on("error", function (err) {
// Handle errors
fs.unlink(dest); // Delete the file async. (But we don't check the result)
if (cb) cb(err.message);
});
}
// Download latest archive from GitHub to temp folder
const dest = userDataPath + "/Cache/GooseMod.zip";
const url =
"https://codeload.github.com/GooseMod/Extension/zip/refs/heads/main";
download(url, dest, function () {
console.log("Downloaded, attempting to install.");
const unzip = require("unzipper")
fs.createReadStream(dest).pipe(unzip.Extract({ path: pluginFolder }));
electron.dialog.showMessageBox({
title: "ArmCord",
type: "warning",
message: "ArmCord has installed GooseMod onto your client.",
detail:
"If you wish to use it restart your ArmCord completely using tray icon. It should appear in next session. GooseMod is reccomended to every user of ArmCord due to various improvements and bugfixes it ships with. You won't be able to load themes or see any of ArmCord specific CSS patches including fixed font logo at the top.",
});
});
}
catch (e){
console.error(`GooseMod failed to download. Error: ${e}`)
}
}
app.whenReady().then(() => {
fs.readdirSync(pluginFolder).forEach((file) => {
try {
const manifest = fs.readFileSync(
`${userDataPath}/plugins/${file}/manifest.json`,
"utf8"
);
var pluginFile = JSON.parse(manifest);
session.defaultSession.loadExtension(`${userDataPath}/plugins/${file}`);
console.log(
`%cLoaded ${pluginFile.name} made by ${pluginFile.author}`,
"color:red"
);
} catch (err) {
console.error(err);
}
});
});

53
utils/theme.js Normal file
View file

@ -0,0 +1,53 @@
const fs = require("fs");
const {shell} = require('electron');
const electron = require("electron");
const ArmCord = require("./ArmCord.js");
const userDataPath = (electron.app || electron.remote.app).getPath("userData");
const themeFolder = userDataPath + "/themes/";
if (!fs.existsSync(themeFolder)) {
fs.mkdirSync(themeFolder);
console.log("Created theme folder");
}
window.addEventListener("DOMContentLoaded", () => {
console.log("Theme Module Loaded"); // I KNOW THIS IS A MESS BUT IT'S WORKING MESS, XOXO
fs.readdirSync(themeFolder).forEach((file) => {
try {
if (file.includes('DISABLED')) {
console.log(`Skipping ${file}.`)
const manifest = fs.readFileSync(`${userDataPath}/themes/${file}/manifest.json`, "utf8");
var themeFile = JSON.parse(manifest);
var html = `<div id="tm-list-item"><div id="theme-name">${themeFile.name}</div><div id="theme-author">By ${themeFile.author}</div><div id="theme-description">${themeFile.description}</div></div><br><br>`;
document.getElementById("tm-disabled").innerHTML = html + document.getElementById("tm-disabled").innerHTML;
}
const manifest = fs.readFileSync(`${userDataPath}/themes/${file}/manifest.json`, "utf8");
var themeFile = JSON.parse(manifest);
const theme = fs.readFileSync(`${userDataPath}/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);
var html = `<div id="tm-list-item"><div id="theme-name">${themeFile.name}</div><div id="theme-author">By ${themeFile.author}</div><div id="theme-description">${themeFile.description}</div></div><br><br>`;
document.getElementById("tm-list").innerHTML = html + document.getElementById("tm-list").innerHTML;
console.log(`%cLoaded ${themeFile.name} made by ${themeFile.author}`, "color:red");
} catch (err) {
console.error(err);
}
});
document.getElementById("open-themes-btn").onclick = function () {shell.openPath(`${userDataPath}/themes`);};
document.getElementsByClassName("back-btn")[0].onclick = function () {
if (document.getElementById("ac-channel").innerHTML == "stable") {
window.location.href = "https://discord.com/app";
} else if (document.getElementById("ac-channel").innerHTML == "canary") {
window.location.href = "https://canary.discord.com/app";
} else if (document.getElementById("ac-channel").innerHTML == "ptb") {
window.location.href = "https://ptb.discord.com/app";
} else if (document.getElementById("ac-channel").innerHTML == "foss") {
window.location.href = "https://dev.fosscord.com/app";
} else {
window.location.href = "https://discord.com/app";
};
};
});

View file

@ -1,66 +0,0 @@
const electron = require("electron");
const APP_VERSION = require("../package.json").version;
/* IMPORTANT!
This url will need to be modified for yours */
// The url that the application is going to query for new release
const AUTO_UPDATE_URL =
'https://api.update.rocks/update/github.com/smartfrigde/armcord/stable/' + process.platform + '/' + APP_VERSION
function init() {
if (process.platform === "linux") {
/* There is no auto update for linux however you can still
notify the user that a new update has been released
our service will return an answer with the latest version. */
console.log("Auto updates not available on linux");
} else {
initDarwinWin32();
}
}
function initDarwinWin32() {
electron.autoUpdater.on("error", (err) =>
console.error(`Update error: ${err.message}`)
);
electron.autoUpdater.on("checking-for-update", () =>
console.log("Checking for update")
);
electron.autoUpdater.on("update-available", () =>
console.log("Update available")
);
electron.autoUpdater.on("update-not-available", () =>
console.log("No update available")
);
// Ask the user if he wants to update if update is available
electron.autoUpdater.on(
"update-downloaded",
(event, releaseNotes, releaseName) => {
dialog.showMessageBox(
window,
{
type: "question",
buttons: ["Update", "Cancel"],
defaultId: 0,
message: `Version ${releaseName} is available, do you want to install it now?`,
title: "Update available",
},
(response) => {
if (response === 0) {
electron.autoUpdater.quitAndInstall();
}
}
);
}
);
electron.autoUpdater.setFeedURL(AUTO_UPDATE_URL);
electron.autoUpdater.checkForUpdates();
}
module.exports = {
init,
};