Compare commits
154 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
abde8e96a7 | ||
|
|
98e5509bd5 | ||
|
|
a7844b86e3 | ||
|
|
262562f050 | ||
|
|
b12d44d10e | ||
|
|
e9e8efbb66 | ||
|
|
e0a85bb003 | ||
|
|
77bfd4ef15 | ||
|
|
0931d85c74 | ||
|
|
1d0aa92b62 | ||
|
|
f6b285ff22 | ||
|
|
64a4df26fc | ||
|
|
e38c785aae | ||
|
|
2d96fad40e | ||
|
|
0990faa41d | ||
|
|
dc93b81ae1 | ||
|
|
2448c87def | ||
|
|
5205d8559f | ||
|
|
6bbf0a3c07 | ||
|
|
af23275735 | ||
|
|
0e25a20ba0 | ||
|
|
b0e1180182 | ||
|
|
68dc8238c3 | ||
|
|
7f99346971 | ||
|
|
401165eb34 | ||
|
|
19d3493322 | ||
|
|
a56b432fba | ||
|
|
414cf25ae8 | ||
|
|
1523b51108 | ||
|
|
20d6ff15ea | ||
|
|
036de69acd | ||
|
|
945acc1738 | ||
|
|
5fa10f606a | ||
|
|
36336f738f | ||
|
|
5cdd217017 | ||
|
|
cd4679913a | ||
|
|
a4009897c2 | ||
|
|
1352abed03 | ||
|
|
47be786461 | ||
|
|
aa90f479e8 | ||
|
|
87cd9ab347 | ||
|
|
5b4cc43637 | ||
|
|
8b9fa8d964 | ||
|
|
01a8686542 | ||
|
|
52bc899440 | ||
|
|
0512796945 | ||
|
|
0a92bc4363 | ||
|
|
7273bd52fa | ||
|
|
985355976e | ||
|
|
3f92812707 | ||
|
|
57fc0b2ab2 | ||
|
|
86ca221428 | ||
|
|
0d7a5b8612 | ||
|
|
f31e0d0587 | ||
|
|
4427217cb2 | ||
|
|
c297b946f4 | ||
|
|
077616dca1 | ||
|
|
c007af6500 | ||
|
|
36febf010c | ||
|
|
f6b18053d9 | ||
|
|
9a1ab563b7 | ||
|
|
a0766a8ddc | ||
|
|
08a6017103 | ||
|
|
4c10ace879 | ||
|
|
2216045a50 | ||
|
|
9894d8e8c4 | ||
|
|
0dfa1e0a0a | ||
|
|
926b393c0f | ||
|
|
f688e4dfc6 | ||
|
|
9f1f3cf5f3 | ||
|
|
c7f2c1fad8 | ||
|
|
b1df00ac39 | ||
|
|
60af217859 | ||
|
|
6e34da9d91 | ||
|
|
07f7566c13 | ||
|
|
66ae261fe3 | ||
|
|
e8b9a337b5 | ||
|
|
c965aa5907 | ||
|
|
3f709f82cc | ||
|
|
972d7e7836 | ||
|
|
335bb4ab5e | ||
|
|
a4dd0601b0 | ||
|
|
d2e9499d6f | ||
|
|
a0bc249936 | ||
|
|
46eeaa27c4 | ||
|
|
6a34ad83ef | ||
|
|
a628bf2850 | ||
|
|
ff2e341a1a | ||
|
|
4f6f5b636b | ||
|
|
fdcc756281 | ||
|
|
5750fff8d7 | ||
|
|
923039adb2 | ||
|
|
153e459665 | ||
|
|
2e75085b72 | ||
|
|
6347f7d86e | ||
|
|
829cb397a8 | ||
|
|
b791dfe045 | ||
|
|
6a20f5cdf3 | ||
|
|
b5279af2c5 | ||
|
|
f56b894e4a | ||
|
|
f18029cfc2 | ||
|
|
78c9999e97 | ||
|
|
bd177b9bf1 | ||
|
|
21bdd39803 | ||
|
|
f8047bb853 | ||
|
|
ba344ac3fb | ||
|
|
b474285180 | ||
|
|
0ac9ee6dd3 | ||
|
|
55233fda91 | ||
|
|
ac17136640 | ||
|
|
b99e851af9 | ||
|
|
5e5d635a09 | ||
|
|
dac035fb5f | ||
|
|
16cd982554 | ||
|
|
7396fca9fc | ||
|
|
0b6d648615 | ||
|
|
3449b76df3 | ||
|
|
9b416830ab | ||
|
|
9922386c18 | ||
|
|
1ebb81bf96 | ||
|
|
c3f619dc79 | ||
|
|
8f9444ab54 | ||
|
|
19d0419a2f | ||
|
|
23083003e9 | ||
|
|
0861a24c0c | ||
|
|
13593d8f41 | ||
|
|
c0c910a2b3 | ||
|
|
2a1eccff80 | ||
|
|
3ca0f5443a | ||
|
|
bed19ed24b | ||
|
|
8909be4543 | ||
|
|
c079a9ecae | ||
|
|
de3194fecc | ||
|
|
92f22ba309 | ||
|
|
75625016a9 | ||
|
|
ec673af07b | ||
|
|
867810ecf9 | ||
|
|
80ce7006ba | ||
|
|
9beb2576a2 | ||
|
|
016a4589ea | ||
|
|
7d068dcf17 | ||
|
|
1ec1ac535a | ||
|
|
18b5e4d66a | ||
|
|
af881aaf07 | ||
|
|
daaeceed91 | ||
|
|
d8a6d14088 | ||
|
|
29d35c42e2 | ||
|
|
a982c7cd1d | ||
|
|
1232995cd9 | ||
|
|
c95e5062d0 | ||
|
|
d1380a5772 | ||
|
|
3339e7ce02 | ||
|
|
81f0f5c2c5 | ||
|
|
cc31d09118 |
22 changed files with 119 additions and 179 deletions
|
|
@ -53,4 +53,4 @@ jobs:
|
|||
git fetch origin
|
||||
git checkout github || git checkout -b github
|
||||
git merge origin/main --no-edit --allow-unrelated-histories
|
||||
git push --force origin github
|
||||
git push --force origin github
|
||||
|
|
|
|||
4
.github/workflows/release.yml
vendored
4
.github/workflows/release.yml
vendored
|
|
@ -98,7 +98,7 @@ jobs:
|
|||
tag_name: ${{ steps.prepare.outputs.tag }}
|
||||
name: Release ${{ steps.prepare.outputs.tag }}
|
||||
files: |
|
||||
dist/shiggycord.js
|
||||
dist/shiggycord.min.js
|
||||
dist/gooncord.js
|
||||
dist/gooncord.min.js
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
|
|
|||
23
README.md
23
README.md
|
|
@ -1,39 +1,40 @@
|
|||
# ShiggyCord [](https://discord.gg/nQykFF9Ud6)
|
||||
# GoonCord [](https://discord.gg/nQykFF9Ud6)
|
||||
|
||||
Bundle based on Kettu, made just for fun
|
||||
An unofficial fork of ShiggyGord, made just for fun
|
||||
Idea taken from me
|
||||
|
||||
## Installing
|
||||
|
||||
### Android
|
||||
|
||||
- Rooted: [Shiggy Xposed](https://github.com/kmmiio99o/ShiggyXposed)
|
||||
- Rooted: [Goon Xposed](https://github.com/OTKUSteyler/GoonXposed)
|
||||
|
||||
- Non-Rooted: [Shiggy Manager](https://github.com/kmmiio99o/ShiggyManager)
|
||||
- Non-Rooted: [Goon Manger](https://github.com/OTKUSteyler/GoonManager)
|
||||
|
||||
### Android/iOS
|
||||
- **Injecting bundle:**
|
||||
```url
|
||||
https://github.com/kmmiio99o/ShiggyCord/releases/latest/download/shiggycord.js
|
||||
https://github.com/OTKUSteyler/GoonCord/releases/latest/download/gooncord.js
|
||||
```
|
||||
|
||||
## Building
|
||||
1. Install a ShiggyCord loader with loader config support (any mentioned in the [Installing](#installing) section).
|
||||
1. Install a GoonCord loader with loader config support (any mentioned in the [Installing](#installing) section).
|
||||
1. Go to Settings > General and enable Developer Settings.
|
||||
1. Clone the repo:
|
||||
```
|
||||
git clone https://github.com/kmmiio99o/Shiggycord.git
|
||||
git clone https://github.com/OTKUSteyler/GoonCord.git
|
||||
```
|
||||
1. Install dependencies:
|
||||
```
|
||||
bun i
|
||||
```
|
||||
1. Build ShiggyCord's code:
|
||||
1. Build GoonCord's code:
|
||||
```
|
||||
bun run build
|
||||
```
|
||||
1. In the newly created `dist` directory, run a HTTP server. I recommend [http-server](https://www.npmjs.com/package/http-server).
|
||||
1. Go to Settings > Developer enabled earlier. Enable `Load from custom url` and input the IP address and port of the server (e.g. `http://192.168.1.236:4040/shiggycord.js`) in the new input box labelled `ShiggyCord URL`.
|
||||
1. Restart Discord. Upon reload, you should notice that your device will download ShiggyCord's bundled code from your server, rather than GitHub.
|
||||
1. Go to Settings > Developer enabled earlier. Enable `Load from custom url` and input the IP address and port of the server (e.g. `http://192.168.1.236:4040/gooncord.js`) in the new input box labelled `GoonCord URL`.
|
||||
1. Restart Discord. Upon reload, you should notice that your device will download GoonCord's bundled code from your server, rather than GitHub.
|
||||
1. Make your changes, rebuild, reload, go wild!
|
||||
|
||||
Alternatively, you can directly *serve* the bundled code by running `bun run serve`. `shiggycord.js` will be served on your local address under the port 4040. You will then insert `http://<local ip address>:4040/shiggycord.js` as a custom url and reload. Whenever you restart your mobile client, the script will rebuild the bundle as your client fetches it.
|
||||
Alternatively, you can directly *serve* the bundled code by running `bun run serve`. `gooncord.js` will be served on your local address under the port 4040. You will then insert `http://<local ip address>:4040/gooncord.js` as a custom url and reload. Whenever you restart your mobile client, the script will rebuild the bundle as your client fetches it.
|
||||
|
|
|
|||
BIN
Stuff/All I Want For Christmas (Is Fark).mp3
Normal file
BIN
Stuff/All I Want For Christmas (Is Fark).mp3
Normal file
Binary file not shown.
1
Stuff/uwu
Normal file
1
Stuff/uwu
Normal file
|
|
@ -0,0 +1 @@
|
|||
|
||||
|
|
@ -1,9 +1,9 @@
|
|||
{
|
||||
"name": "ShiggyCord",
|
||||
"name": "GoonCord",
|
||||
"private": true,
|
||||
"author": {
|
||||
"name": "kmmiio99o",
|
||||
"url": "https://github.com/kmmiio99o"
|
||||
"name": "OTKUSteyler",
|
||||
"url": "https://github.com/OTKUSteyler/GoonCord"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "node scripts/build.mjs",
|
||||
|
|
|
|||
128
shims/weakref.js
128
shims/weakref.js
|
|
@ -1,128 +0,0 @@
|
|||
// @ts-nocheck
|
||||
/**
|
||||
* WeakRef / FinalizationRegistry shim
|
||||
*
|
||||
* Purpose:
|
||||
* - Provide a safe fallback when the runtime doesn't implement WeakRef or FinalizationRegistry.
|
||||
* - This fallback avoids a ReferenceError and keeps code paths functional, but it does NOT
|
||||
* emulate true weak-reference GC behavior. Use it only as a compatibility fallback.
|
||||
*
|
||||
*/
|
||||
|
||||
let _shimWarned = false;
|
||||
|
||||
function _warnOnce(msg) {
|
||||
if (!_shimWarned) {
|
||||
// keep this quiet by default; print only when fallback is actually used
|
||||
try {
|
||||
// Prefer console.warn when available
|
||||
if (typeof console !== "undefined" && typeof console.warn === "function") {
|
||||
console.warn(`[weakref-shim] ${msg}`);
|
||||
}
|
||||
} catch (_) {}
|
||||
_shimWarned = true;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* WeakRef fallback
|
||||
* - Keeps a strong reference to the target (so it will not be GC'd).
|
||||
* - Implements the minimal `deref()` API.
|
||||
*/
|
||||
class WeakRefFallback {
|
||||
constructor(value) {
|
||||
// Keep a strong reference: this is *not* weak.
|
||||
this.__value = value;
|
||||
_warnOnce(
|
||||
"WeakRef is not available in this runtime. Using a strong-reference fallback — memory usage/semantics may differ."
|
||||
);
|
||||
}
|
||||
|
||||
deref() {
|
||||
return this.__value;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* FinalizationRegistry fallback
|
||||
* - No-op registry: register/unregister do nothing.
|
||||
* - Implement `cleanupSome` as a best-effort sync call when a callback is provided,
|
||||
* but it cannot be tied to GC.
|
||||
*/
|
||||
class FinalizationRegistryFallback {
|
||||
constructor(cleanupCallback) {
|
||||
// store callback to allow optional manual invocation via cleanupSome
|
||||
this.__cleanupCallback = typeof cleanupCallback === "function" ? cleanupCallback : null;
|
||||
_warnOnce(
|
||||
"FinalizationRegistry is not available in this runtime. Using a no-op fallback — finalizers will not run based on GC."
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* register(target, heldValue, unregisterToken?)
|
||||
* - No-op in fallback. We keep no strong references here on purpose (can't emulate GC).
|
||||
*/
|
||||
register(_target /*, _heldValue, _unregisterToken */) {
|
||||
// intentionally no-op
|
||||
}
|
||||
|
||||
/**
|
||||
* unregister(unregisterToken)
|
||||
* - No-op in fallback.
|
||||
*/
|
||||
unregister(_unregisterToken) {
|
||||
// intentionally no-op
|
||||
}
|
||||
|
||||
/**
|
||||
* cleanupSome(callback?)
|
||||
* - If provided a callback or a stored cleanup callback exists, call it immediately.
|
||||
* - This is NOT equivalent to real FinalizationRegistry cleanup; it's only a manual helper.
|
||||
*/
|
||||
cleanupSome(callback) {
|
||||
const cb = typeof callback === "function" ? callback : this.__cleanupCallback;
|
||||
if (typeof cb === "function") {
|
||||
try {
|
||||
cb();
|
||||
} catch (e) {
|
||||
try {
|
||||
if (typeof console !== "undefined" && typeof console.error === "function") {
|
||||
console.error("[weakref-shim] error running cleanupSome callback:", e);
|
||||
}
|
||||
} catch (_) {}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// If native implementations exist, prefer them; otherwise install fallbacks.
|
||||
// We assign to globalThis so code using `WeakRef`/`FinalizationRegistry` globals doesn't crash.
|
||||
const NativeWeakRef =
|
||||
typeof globalThis !== "undefined" && typeof globalThis.WeakRef === "function" ? globalThis.WeakRef : undefined;
|
||||
|
||||
const NativeFinalizationRegistry =
|
||||
typeof globalThis !== "undefined" && typeof globalThis.FinalizationRegistry === "function"
|
||||
? globalThis.FinalizationRegistry
|
||||
: undefined;
|
||||
|
||||
const WeakRefImpl = NativeWeakRef ?? WeakRefFallback;
|
||||
const FinalizationRegistryImpl = NativeFinalizationRegistry ?? FinalizationRegistryFallback;
|
||||
|
||||
try {
|
||||
if (typeof globalThis !== "undefined") {
|
||||
if (typeof globalThis.WeakRef === "undefined") {
|
||||
// Install fallback
|
||||
globalThis.WeakRef = WeakRefImpl;
|
||||
}
|
||||
if (typeof globalThis.FinalizationRegistry === "undefined") {
|
||||
globalThis.FinalizationRegistry = FinalizationRegistryImpl;
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
// Some embedder environments may forbid writing globals; ignore in that case.
|
||||
_warnOnce("Unable to assign WeakRef/FinalizationRegistry to globalThis: " + (e && e.message));
|
||||
}
|
||||
|
||||
// Export the implementations so the inject mechanism (or explicit imports) can reference them.
|
||||
// Export names are sorted to satisfy lint rules that require sorted exports.
|
||||
export { FinalizationRegistryImpl as FinalizationRegistry, WeakRefImpl as WeakRef };
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 21 KiB |
|
|
@ -4,10 +4,10 @@ import { BundleUpdaterManager } from "@lib/api/native/modules";
|
|||
|
||||
export default () =>
|
||||
<ApplicationCommand>{
|
||||
name: "reload",
|
||||
name: "ReGoon",
|
||||
description: Strings.COMMAND_RELOAD_DESC,
|
||||
options: [],
|
||||
execute() {
|
||||
BundleUpdaterManager.reload();
|
||||
},
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -4,12 +4,10 @@
|
|||
"ARE_YOU_SURE_TO_CLEAR_DATA": "Are you sure you wish to clear the data of {name}?",
|
||||
"ARE_YOU_SURE_TO_DELETE_PLUGIN": "Are you sure you wish to delete {name}? This will clear all of the plugin's data.",
|
||||
"ARE_YOU_SURE_TO_DELETE_THEME": "Are you sure you wish to delete {name}?",
|
||||
"AUTO_DEBUGGER": "Automatically connect to Debugger",
|
||||
"AUTO_DEVTOOLS": "Automatically connect to Devtools",
|
||||
"ASSET_BROWSER": "Asset Browser",
|
||||
"BRAND": "Brand",
|
||||
"SHIGGYCORD": "ShiggyCold",
|
||||
"SHIGGYCORD_URL": "ShiggyCold URL",
|
||||
"SHIGGYCORD": "💦GoonCord💦",
|
||||
"SHIGGYCORD_URL": "GoonCord URL",
|
||||
"BROWSER": "Browser",
|
||||
"BYTECODE": "Bytecode",
|
||||
"CANCEL": "Cancel",
|
||||
|
|
@ -21,14 +19,13 @@
|
|||
"CLEAR_DATA_SUCCESSFUL": "Cleared data for {name}",
|
||||
"CODEBERG": "Codeberg",
|
||||
"CODENAME": "Codename",
|
||||
"COMMAND_DEBUG_DESC": "Send ShiggyCord debug info.",
|
||||
"COMMAND_DEBUG_DESC": "Send GoonCord debug info.",
|
||||
"COMMAND_DEBUG_OPT_EPHEMERALLY": "Send debug info ephemerally.",
|
||||
"COMMAND_EVAL_DESC": "Evaluate JavaScript code.",
|
||||
"COMMAND_EVAL_OPT_ASYNC": "Whether to support 'await' in code. Must explicitly return for result (default: false)",
|
||||
"COMMAND_EVAL_OPT_CODE": "The code to evaluate.",
|
||||
"COMMAND_PLUGINS_DESC": "Send list of installed plugins.",
|
||||
"COMMAND_PLUGINS_OPT_EPHEMERALLY": "Send plugins list ephemerally.",
|
||||
"COMMAND_RELOAD_DESC": "Reload Discord.",
|
||||
"COMPONENT": "Component",
|
||||
"CONFIRMATION_LINK_IS_A_TYPE": "This link is a **{urlType, select, plugin {Plugin} theme {Theme} other {Add-on}}**, would you like to install it?",
|
||||
"CONNECT_TO_DEBUG_WEBSOCKET": "Connect to debug WebSocket",
|
||||
|
|
@ -39,7 +36,6 @@
|
|||
"DEBUG": "Debug",
|
||||
"DEBUGGER_URL": "Debugger URL",
|
||||
"DELETE": "Delete",
|
||||
"DEVTOOLS_URL": "DevTools URL",
|
||||
"DESC_EXTRACT_FONTS_FROM_THEME": "Looks out for \"fonts\" field in your currently applied theme and install it.",
|
||||
"DEVELOPER": "Developer",
|
||||
"DEVELOPER_SETTINGS": "Developer Settings",
|
||||
|
|
@ -67,9 +63,8 @@
|
|||
"LABEL_EXTRACT_FONTS_FROM_THEME": "Extract font from theme",
|
||||
"LINKS": "Links",
|
||||
"LOAD_FROM_CUSTOM_URL": "Load from custom URL",
|
||||
"LOAD_FROM_CUSTOM_URL_DEC": "Load ShiggyCord from a custom endpoint.",
|
||||
"LOAD_FROM_CUSTOM_URL_DEC": "Load GoonCord from a custom endpoint.",
|
||||
"LOAD_REACT_DEVTOOLS": "Load React DevTools",
|
||||
"SHIGGY_URL": "ShiggyCord URL",
|
||||
"LOADER": "Loader",
|
||||
"MACHINE_ID": "Machine ID",
|
||||
"MANUFACTURER": "Manufacturer",
|
||||
|
|
@ -91,7 +86,7 @@
|
|||
"PLUGINS": "Plugins",
|
||||
"REFETCH": "Refetch",
|
||||
"RELOAD": "Reload",
|
||||
"RELOAD_DISCORD": "Reshiggy your Discord",
|
||||
"RELOAD_DISCORD": "ReGoon your Discord",
|
||||
"RELOAD_IN_NORMAL_MODE": "Reload in Normal Mode",
|
||||
"RELOAD_IN_NORMAL_MODE_DESC": "Safe mode currently enabled, tap to reload in normal mode",
|
||||
"RELOAD_IN_SAFE_MODE": "Reload in Safe Mode",
|
||||
|
|
@ -120,7 +115,7 @@
|
|||
"UH_OH": "Uh Oh",
|
||||
"UNINSTALL": "Uninstall",
|
||||
"UNINSTALL_TITLE": "Uninstall {title}",
|
||||
"URL_PLACEHOLDER": "https://github.com/kmmiio99o/ShiggyCord",
|
||||
"URL_PLACEHOLDER": "https://github.com/OTKUSteyler/GoonCord",
|
||||
"VERSION": "Version",
|
||||
"VERSIONS": "Versions"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ export function initFetchI18nStrings() {
|
|||
_loadedLocale.add(resolvedLocale);
|
||||
|
||||
fetch(
|
||||
`https://raw.githubusercontent.com/kmmiio99o/i18n/main/resources/${resolvedLocale}/shiggycord.json`,
|
||||
`https://raw.githubusercontent.com/OTKUSteyler/i18n/main/resources/${resolvedLocale}/gooncord.json`,
|
||||
)
|
||||
.then((r) => r.json())
|
||||
.then((strings) => (_loadedStrings[resolvedLocale] = strings))
|
||||
|
|
|
|||
|
|
@ -42,19 +42,19 @@ function transformLinks(content: string, config: FixEmbedSettings): string {
|
|||
if (config.instagram) {
|
||||
result = result.replace(
|
||||
/https?:\/\/(?:www\.)?instagram\.com(\/[^\s]+)/gi,
|
||||
"https://uuinstagram.com$1",
|
||||
"https://kkinstagram.com$1",
|
||||
);
|
||||
}
|
||||
// TikTok: Replace domain, keep path
|
||||
if (config.tiktok) {
|
||||
result = result.replace(
|
||||
/https?:\/\/(?:www\.)?tiktok\.com(\/[^\s]+)/gi,
|
||||
"https://tnktok.com$1",
|
||||
"https://tiktokez.com$1",
|
||||
);
|
||||
// TikTok short links (vm.tiktok.com)
|
||||
result = result.replace(
|
||||
/https?:\/\/vm\.tiktok\.com\/([A-Za-z0-9]+)\/?/gi,
|
||||
"https://vm.tnktok.com/$1",
|
||||
"https://vm.tiktokez.com/$1",
|
||||
);
|
||||
}
|
||||
// Reddit: Replace domain, keep path
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ declare module "@lib/api/settings" {
|
|||
}
|
||||
|
||||
const soundUrl =
|
||||
"https://github.com/kmmiio99o/kmmiio99o.github.io/raw/refs/heads/main/music/shiggycord.mp3";
|
||||
"https://github.com/OTKUSteyler/GoonCord/raw/refs/heads/main/Stuff/All%20I%20Want%20For%20Christmas%20(Is%20Fark).mp3";
|
||||
const soundId = 6971;
|
||||
let soundDuration = -1;
|
||||
let timeoutId: NodeJS.Timeout | null = null;
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ export { shiggycordIcon };
|
|||
|
||||
export default function initSettings() {
|
||||
registerSection({
|
||||
name: "ShiggyCord",
|
||||
name: "GoonCord",
|
||||
items: [
|
||||
{
|
||||
key: "SHIGGYCORD",
|
||||
|
|
@ -21,11 +21,20 @@ export default function initSettings() {
|
|||
useTrailing: () => `(${version})`,
|
||||
},
|
||||
{
|
||||
key: "BUNNY_PLUGINS",
|
||||
key: "CORE_PLUGINS",
|
||||
title: () => Strings.PLUGINS,
|
||||
icon: findAssetId("ActivitiesIcon"),
|
||||
render: () => import("@core/ui/settings/pages/Plugins"),
|
||||
},
|
||||
{
|
||||
key: "BUNNY_PLUGINS",
|
||||
title: () => "External Plugins",
|
||||
icon:
|
||||
findAssetId("DownloadIcon") ??
|
||||
findAssetId("LinkIcon") ??
|
||||
findAssetId("ActivitiesIcon"),
|
||||
render: () => import("@core/ui/settings/pages/Plugins"),
|
||||
},
|
||||
{
|
||||
key: "BUNNY_THEMES",
|
||||
title: () => Strings.THEMES,
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@ export default function About() {
|
|||
variant="text-md/medium"
|
||||
style={{ textAlign: "center", marginTop: 4 }}
|
||||
>
|
||||
Jolly your discord client!
|
||||
Goon your discord client!
|
||||
</Text>
|
||||
</View>
|
||||
|
||||
|
|
|
|||
|
|
@ -113,7 +113,7 @@ export default function General() {
|
|||
>
|
||||
<TableRowGroup title="App Information">
|
||||
<TableRow
|
||||
label="ShiggyCold"
|
||||
label="GoonCold"
|
||||
icon={<TableRow.Icon source={{ uri: shiggycordIcon }} />}
|
||||
trailing={<TableRow.TrailingText text={debugInfo.bunny.version} />}
|
||||
/>
|
||||
|
|
|
|||
45
src/core/ui/settings/pages/Plugins/CorePlugins.tsx
Normal file
45
src/core/ui/settings/pages/Plugins/CorePlugins.tsx
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
import { React } from "@metro/common";
|
||||
import AddonPage from "@core/ui/components/AddonPage";
|
||||
import PluginCard from "@core/ui/settings/pages/Plugins/components/PluginCard";
|
||||
import { corePluginInstances, registeredPlugins } from "@lib/addons/plugins";
|
||||
import { UnifiedPluginModel } from "@core/ui/settings/pages/Plugins/models";
|
||||
import unifyBunnyPlugin from "@core/ui/settings/pages/Plugins/models/bunny";
|
||||
import { Strings } from "@core/i18n";
|
||||
|
||||
/**
|
||||
* Core plugins settings page
|
||||
*
|
||||
* This page shows only the built-in core plugins. Core plugins are always
|
||||
* installed (can't be uninstalled) and are registered in `corePluginInstances`.
|
||||
*
|
||||
* We reuse the existing `AddonPage` + `PluginCard` components and feed them
|
||||
* the normalized `UnifiedPluginModel` objects produced by `unifyBunnyPlugin`.
|
||||
*/
|
||||
|
||||
export default function CorePlugins() {
|
||||
return (
|
||||
<AddonPage<UnifiedPluginModel>
|
||||
CardComponent={PluginCard}
|
||||
title={Strings.PLUGINS}
|
||||
searchKeywords={[
|
||||
"name",
|
||||
"description",
|
||||
(p) =>
|
||||
p.authors
|
||||
?.map((a: any) => (typeof a === "string" ? a : a.name))
|
||||
.join() || "",
|
||||
]}
|
||||
// Provide simple sort options so the Search input renders round and a sort menu appears
|
||||
sortOptions={{
|
||||
"Name (A-Z)": (a, b) => a.name.localeCompare(b.name),
|
||||
"Name (Z-A)": (a, b) => b.name.localeCompare(a.name),
|
||||
}}
|
||||
// Only core plugins: map corePluginInstances -> registeredPlugins -> unify
|
||||
items={[...corePluginInstances.keys()]
|
||||
.map((id) => registeredPlugins.get(id))
|
||||
.filter((m): m is any => m !== undefined)
|
||||
.map(unifyBunnyPlugin)}
|
||||
ListHeaderComponent={() => null}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
|
@ -702,7 +702,7 @@ export default function Plugins() {
|
|||
// Use the insertion order of pluginSettings so newly-installed plugins
|
||||
// (which add entries to pluginSettings) appear first.
|
||||
const installedBnIds = Object.keys(pluginSettings || {})
|
||||
.filter((id) => registeredPlugins.has(id))
|
||||
.filter((id) => registeredPlugins.has(id) && !isCorePlugin(id))
|
||||
.slice()
|
||||
.reverse();
|
||||
|
||||
|
|
@ -710,12 +710,12 @@ export default function Plugins() {
|
|||
.map((id) => registeredPlugins.get(id)!)
|
||||
.map(unifyBunnyPlugin);
|
||||
|
||||
// Merge lists: show Vendetta-managed plugins first,
|
||||
// Merge lists: show Vendetta-managed plugins first (recent first),
|
||||
// then Bunny-installed externals (recent first).
|
||||
const allPlugins = [...vdPlugins, ...bnPlugins];
|
||||
|
||||
// Include core plugins in the list
|
||||
return allPlugins;
|
||||
// Filter out core plugins from the list
|
||||
return allPlugins.filter((plugin) => !isCorePlugin(plugin.id));
|
||||
}}
|
||||
ListHeaderComponent={() => null}
|
||||
installAction={{
|
||||
|
|
|
|||
|
|
@ -126,5 +126,5 @@ export default async () => {
|
|||
}
|
||||
|
||||
// Final ready log for basic UI availability.
|
||||
logger.log("ShiggyCord is ready.");
|
||||
logger.log("GoonCord is ready.");
|
||||
};
|
||||
|
|
|
|||
|
|
@ -12,22 +12,39 @@ const mmkvStorage = proxyLazy(() => {
|
|||
|
||||
export default function patchStorage() {
|
||||
const patchedKeys = new Set(["ThemeStore", "SelectivelySyncedUserSettingsStore"]);
|
||||
const sanitizedKeys = new Set<string>();
|
||||
|
||||
const patches = [
|
||||
after("get", mmkvStorage, ([key], ret) => {
|
||||
if (!_colorRef.current || !patchedKeys.has(key)) return;
|
||||
if (!patchedKeys.has(key)) return;
|
||||
|
||||
const state = findInTree(ret._state, s => typeof s.theme === "string");
|
||||
if (state) state.theme = _colorRef.key;
|
||||
if (!state) return;
|
||||
|
||||
const lastSetDiscordTheme = _colorRef.lastSetDiscordTheme ?? "darker";
|
||||
|
||||
if (/^bn-theme-\d+$/.test(state.theme) && !/^bn-theme-\d+$/.test(lastSetDiscordTheme) && !sanitizedKeys.has(key)) {
|
||||
try {
|
||||
const newVal = { ...ret._state, theme: lastSetDiscordTheme };
|
||||
mmkvStorage.set(key, newVal);
|
||||
sanitizedKeys.add(key);
|
||||
} catch (e) {
|
||||
}
|
||||
state.theme = lastSetDiscordTheme;
|
||||
return;
|
||||
}
|
||||
|
||||
if (_colorRef.current) state.theme = _colorRef.key;
|
||||
}),
|
||||
before("set", mmkvStorage, ([key, value]) => {
|
||||
if (!patchedKeys.has(key)) return;
|
||||
|
||||
const json = JSON.stringify(value);
|
||||
const lastSetDiscordTheme = _colorRef.lastSetDiscordTheme ?? "darker";
|
||||
const replacementTheme = /^bn-theme-\d+$/.test(lastSetDiscordTheme) ? "darker" : lastSetDiscordTheme;
|
||||
const replaced = json.replace(
|
||||
/"theme":"bn-theme-\d+"/,
|
||||
`"theme":${JSON.stringify(lastSetDiscordTheme)}`
|
||||
`"theme":${JSON.stringify(replacementTheme)}`
|
||||
);
|
||||
|
||||
return [key, JSON.parse(replaced)];
|
||||
|
|
|
|||
|
|
@ -399,4 +399,4 @@ export function initDebugger() {
|
|||
logger.error("Failed to connect to ReactDevTools during startup:", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -57,15 +57,15 @@ export function patchPanelUI(unpatches: (() => void | boolean)[]) {
|
|||
after("default", findByNameLazy("getScreens", false), (_a, screens) => ({
|
||||
...screens,
|
||||
VendettaCustomPage: {
|
||||
title: "ShiggyCord",
|
||||
title: "GoonCord",
|
||||
render: () => <CustomPageRenderer />,
|
||||
},
|
||||
BUNNY_CUSTOM_PAGE: {
|
||||
title: "ShiggyCord",
|
||||
title: "GoonCord",
|
||||
render: () => <CustomPageRenderer />,
|
||||
},
|
||||
SHIGGYCORD_CUSTOM_PAGE: {
|
||||
title: "ShiggyCord",
|
||||
title: "GoonCord",
|
||||
render: () => <CustomPageRenderer />,
|
||||
},
|
||||
})),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue