Skip to content

Commit

Permalink
GoofMod is gone 😧
Browse files Browse the repository at this point in the history
  • Loading branch information
Milkshiift committed Oct 16, 2023
1 parent 2f67a93 commit 7e65136
Show file tree
Hide file tree
Showing 19 changed files with 56 additions and 877 deletions.
34 changes: 0 additions & 34 deletions .github/workflows/build.yml

This file was deleted.

24 changes: 24 additions & 0 deletions .github/workflows/zip&publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Zip and Publish
on: [workflow_dispatch]

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Create Zip File
uses: vimtor/action-zip@v1
with:
files: ./patches
dest: patches.zip

- name: Upload Zip
uses: svenstaro/upload-release-action@2.7.0
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ${{ github.workspace }}/patches.zip
asset_name: patches.zip
tag: "Build"
overwrite: true
6 changes: 6 additions & 0 deletions .idea/jsLibraryMappings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
# GoofMod
A helper mod for GoofCord.

Based on https://github.com/ArmCord/Mod and https://github.com/Vendicated/Vencord
# GoofCord Scripts
A collection of default GoofCord helper scripts
8 changes: 1 addition & 7 deletions fix.bat
Original file line number Diff line number Diff line change
@@ -1,15 +1,9 @@
@echo off

:: Windows script to copy built goofmod into the scripts folder
:: Also, copy all files from the "./patches" folder to the destination
:: Windows script to copy patches into the scripts folder

set "source_goofmod=.\dist\0_goofmod.js"
set "source_patches=.\patches"
set "destination_goofmod=C:\Users\Administrator\AppData\Roaming\GoofCord\scripts"


:: Copy goofmod.js
copy "%source_goofmod%" "%destination_goofmod%"

:: Copy all files from the "patches" folder
xcopy "%source_patches%" "%destination_goofmod%" /E /Y
21 changes: 0 additions & 21 deletions package.json

This file was deleted.

9 changes: 5 additions & 4 deletions patches/AL10_screenshareQuality.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
*/

function patchScreenshareQuality(responseParams) {
window.goofmod.log("[ScreenshareQualityPatch] Loading screenshare quality patch...");
const StreamQuality = window.goofmod.find(m => m.prototype?.getVideoQuality);
console.log("[ScreenshareQualityPatch] Loading screenshare quality patch...");
const StreamQuality = Vencord.Webpack.find(m => m.prototype?.getVideoQuality);
const ASPECT_RATIO = screen.width / screen.height;
const width = Math.round(responseParams.height * ASPECT_RATIO);

Expand Down Expand Up @@ -57,8 +57,9 @@ function patchScreenshareQuality(responseParams) {

// Setting default settings
patchScreenshareQuality({
framerate: 60,
framerate: 30,
height: 1080
});

window.patchScreenshareQuality = patchScreenshareQuality;
window.ScreenshareQuality = {};
window.ScreenshareQuality.patchScreenshareQuality = patchScreenshareQuality;
5 changes: 5 additions & 0 deletions patches/AL11_messageEncryption.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/**
* @name MessageEncryption
* @description Encrypts messages
* @version 1.0.0
*/
42 changes: 13 additions & 29 deletions patches/BL10_consoleSupressor.js
Original file line number Diff line number Diff line change
@@ -1,34 +1,18 @@
/**
* @name ConsoleSupressor
* @description Suppresses messages in the console that are not necessary
* @version 1.0.0
* @description Suppresses Discord logger
* @version 2.0.0
*/

// All the messages here are useless and just spam the console
// Some filters are not included to keep the list small
const messagesToFilter = [
"[Gate", // [GatewaySocket]
"[RTC", // [RTCConnection]
"[Anal", // [Analytics]
"[Unif", // [UnifiedConnection]
"[Str" // [StreamTile]
];

function filterConsoleMessages() {
const originalConsoleMethods = {};

// Iterate through all console methods and filter messages
Object.keys(console).forEach(method => {
originalConsoleMethods[method] = console[method];

console[method] = function () {
const message = arguments[0];
if (message && messagesToFilter.some(msg => message.includes(msg))) {
return;
const patches = [
{
find: "=console)[",
replacement: [
{
match: /\(.=console.{53}/,
replace: ""
}
originalConsoleMethods[method].apply(console, arguments);
};
});
}

filterConsoleMessages();
],
plugin: 'ConsoleSupressor'
}
];
158 changes: 0 additions & 158 deletions pnpm-lock.yaml

This file was deleted.

24 changes: 0 additions & 24 deletions rollup.config.js

This file was deleted.

Loading

0 comments on commit 7e65136

Please sign in to comment.