diff --git a/LICENSE b/LICENSE index 261eeb9..b4c5020 100644 --- a/LICENSE +++ b/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright [yyyy] [name of copyright owner] + Copyright 2023 Arash Amini (Known as ghalbeyou) Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/README.MD b/README.MD new file mode 100644 index 0000000..d7bccbe --- /dev/null +++ b/README.MD @@ -0,0 +1,9 @@ +# ThemeCord + +All of the **information** is on the front page of themecord github. + +## Develop +If you want to develop this app, or help it you can in this repo. + +## Download +If you want to download, use the releases. \ No newline at end of file diff --git a/main.py b/main.py new file mode 100644 index 0000000..cf9d32d --- /dev/null +++ b/main.py @@ -0,0 +1,47 @@ +import urllib.request +import subprocess +import os + +from PyQt5 import QtCore, QtGui, QtWidgets +from PyQt5.QtWidgets import QMainWindow, QMessageBox +from ui_mainwindow import Ui_MainWindow +from ui_remove import Ui_Remove + + +class MainWindow(QMainWindow): + def __init__(self): + super().__init__() + self.ui = Ui_MainWindow() + self.ui.setupUi(self) + self.ui.pushButton.clicked.connect(self.inject_theme) + self.ui.pushButton_2.clicked.connect(self.remove_theme) + + def remove_theme(self): + dialog = QtWidgets.QDialog(self) + ui = Ui_Remove() + ui.setupUi(dialog) + dialog.exec_() + + def inject_theme(self): + css_url = self.ui.textEdit.toPlainText() + if css_url == "": + self.ui.label.setText("Please fill the input") + return + css_filename = css_url.split("/")[-1] + css_path = os.path.join(os.path.dirname(__file__), "themecord", css_filename) + urllib.request.urlretrieve(css_url, css_path) + subprocess.run([os.path.join(os.path.dirname(__file__), "themecord", "injector.exe"), "--css", css_path], check=True) + message_box = QMessageBox() + message_box.setWindowTitle("Complete") + message_box.setText("Installed theme on the current running discord.") + message_box.setIcon(QMessageBox.Information) + message_box.addButton(QMessageBox.Ok) + message_box.exec_() + + +if __name__ == "__main__": + import sys + app = QtWidgets.QApplication(sys.argv) + window = MainWindow() + window.show() + sys.exit(app.exec_()) diff --git a/themecord/Injector.exe b/themecord/Injector.exe new file mode 100644 index 0000000..370dbae Binary files /dev/null and b/themecord/Injector.exe differ diff --git a/themecord/VCRUNTIME140.dll b/themecord/VCRUNTIME140.dll new file mode 100644 index 0000000..931bce0 Binary files /dev/null and b/themecord/VCRUNTIME140.dll differ diff --git a/themecord/base_library.zip b/themecord/base_library.zip new file mode 100644 index 0000000..85677b8 Binary files /dev/null and b/themecord/base_library.zip differ diff --git a/themecord/libcrypto-1_1.dll b/themecord/libcrypto-1_1.dll new file mode 100644 index 0000000..41e1a67 Binary files /dev/null and b/themecord/libcrypto-1_1.dll differ diff --git a/themecord/libffi-7.dll b/themecord/libffi-7.dll new file mode 100644 index 0000000..8fd2e5e Binary files /dev/null and b/themecord/libffi-7.dll differ diff --git a/themecord/libssl-1_1.dll b/themecord/libssl-1_1.dll new file mode 100644 index 0000000..15fe3cd Binary files /dev/null and b/themecord/libssl-1_1.dll differ diff --git a/themecord/python310.dll b/themecord/python310.dll new file mode 100644 index 0000000..34ea732 Binary files /dev/null and b/themecord/python310.dll differ diff --git a/ui_mainwindow.py b/ui_mainwindow.py new file mode 100644 index 0000000..4b32c63 --- /dev/null +++ b/ui_mainwindow.py @@ -0,0 +1,61 @@ +from PyQt5 import QtCore, QtGui, QtWidgets + + +class Ui_MainWindow(object): + def setupUi(self, MainWindow): + MainWindow.setObjectName("MainWindow") + MainWindow.resize(789, 466) + self.centralwidget = QtWidgets.QWidget(MainWindow) + self.centralwidget.setObjectName("centralwidget") + self.verticalLayoutWidget = QtWidgets.QWidget(self.centralwidget) + self.verticalLayoutWidget.setGeometry(QtCore.QRect(100, 100, 571, 191)) + self.verticalLayoutWidget.setObjectName("verticalLayoutWidget") + self.verticalLayout = QtWidgets.QVBoxLayout(self.verticalLayoutWidget) + self.verticalLayout.setContentsMargins(0, 0, 0, 0) + self.verticalLayout.setObjectName("verticalLayout") + self.label = QtWidgets.QLabel(self.verticalLayoutWidget) + font = QtGui.QFont() + font.setPointSize(15) + font.setBold(True) + font.setWeight(75) + font.setKerning(True) + self.label.setFont(font) + self.label.setMouseTracking(False) + self.label.setLayoutDirection(QtCore.Qt.LeftToRight) + self.label.setAutoFillBackground(False) + self.label.setObjectName("label") + self.verticalLayout.addWidget(self.label) + self.textEdit = QtWidgets.QTextEdit(self.verticalLayoutWidget) + font = QtGui.QFont() + font.setBold(False) + font.setWeight(50) + font.setKerning(True) + self.textEdit.setFont(font) + self.textEdit.setObjectName("textEdit") + self.verticalLayout.addWidget(self.textEdit) + self.pushButton = QtWidgets.QPushButton(self.verticalLayoutWidget) + self.pushButton.setObjectName("pushButton") + self.verticalLayout.addWidget(self.pushButton) + self.pushButton_2 = QtWidgets.QPushButton(self.centralwidget) + self.pushButton_2.setGeometry(QtCore.QRect(660, 380, 93, 28)) + self.pushButton_2.setObjectName("pushButton_2") + MainWindow.setCentralWidget(self.centralwidget) + self.menubar = QtWidgets.QMenuBar(MainWindow) + self.menubar.setGeometry(QtCore.QRect(0, 0, 789, 26)) + self.menubar.setObjectName("menubar") + MainWindow.setMenuBar(self.menubar) + self.statusbar = QtWidgets.QStatusBar(MainWindow) + self.statusbar.setObjectName("statusbar") + MainWindow.setStatusBar(self.statusbar) + + self.retranslateUi(MainWindow) + QtCore.QMetaObject.connectSlotsByName(MainWindow) + + def retranslateUi(self, MainWindow): + _translate = QtCore.QCoreApplication.translate + MainWindow.setWindowTitle(_translate("MainWindow", "MainWindow")) + self.label.setText(_translate("MainWindow", "Register theme")) + self.pushButton.setToolTip(_translate("MainWindow", "

Add this theme to the discord

")) + self.pushButton.setText(_translate("MainWindow", "Register theme")) + self.pushButton_2.setToolTip(_translate("MainWindow", "

Remove all of themes applied to the discord

")) + self.pushButton_2.setText(_translate("MainWindow", "Remove")) diff --git a/ui_remove.py b/ui_remove.py new file mode 100644 index 0000000..ea1856a --- /dev/null +++ b/ui_remove.py @@ -0,0 +1,40 @@ +from PyQt5 import QtCore, QtGui, QtWidgets +from PyQt5.QtWidgets import QMessageBox +import subprocess +import os + + +class Ui_Remove(object): + def setupUi(self, Remove): + Remove.setObjectName("Remove") + Remove.resize(393, 219) + self.buttonBox = QtWidgets.QDialogButtonBox(Remove) + self.buttonBox.setGeometry(QtCore.QRect(-20, 120, 341, 32)) + self.buttonBox.setOrientation(QtCore.Qt.Horizontal) + self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel | QtWidgets.QDialogButtonBox.Ok) + self.buttonBox.setObjectName("buttonBox") + self.label = QtWidgets.QLabel(Remove) + self.label.setGeometry(QtCore.QRect(30, 90, 341, 21)) + font = QtGui.QFont() + font.setPointSize(7) + self.label.setFont(font) + self.label.setObjectName("label") + + self.retranslateUi(Remove) + self.buttonBox.accepted.connect(self.accept) + self.buttonBox.rejected.connect(Remove.reject) + QtCore.QMetaObject.connectSlotsByName(Remove) + + def retranslateUi(self, Remove): + _translate = QtCore.QCoreApplication.translate + Remove.setWindowTitle(_translate("Remove", "Remove")) + self.label.setText(_translate("Remove", "Are you sure you want to remove all of the themes applied?")) + + def accept(self): + subprocess.run([os.path.join(os.path.dirname(__file__), "themecord", "injector.exe"), "--revert"], check=True) + message_box = QMessageBox() + message_box.setWindowTitle("Complete") + message_box.setText("Removed themes on the current running discord.") + message_box.setIcon(QMessageBox.Information) + message_box.addButton(QMessageBox.Ok) + message_box.exec_()