mirror of
https://github.com/DorkSquadRR/DorkNet.git
synced 2026-10-26 23:48:45 -07:00
Import december-2020-12-18 from private repo (scrubbed 2026-05-27)
Targets Rec Room 2020.12.18 client.
Re-import after adding:
- DorkNet.ClientMod/dorknet-clientmod.json.template — config schema
the launcher's manifest-driven patcher renders into UserData/.
- tools/build-patcher-zip.ps1 — produces the dorknet-clientpatch-{key}.zip
Release asset the launcher fetches.
- .github/workflows/release.yml — auto-publishes both Release assets
on v1-december-* tag push.
Scrubbed via maintainer-side scrub-for-public.ps1: same drop rules as
the prior import, plus build-patcher-zip.ps1 added to the tools/
allow-list so it survives the scrub.
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
// Chromium gate. The zip importer uploads multi-hundred-megabyte
|
||||
// FormData bodies and uses File / Blob slicing patterns that are
|
||||
// effectively only stable on Chromium right now:
|
||||
// * Firefox's xhr.upload.progress + multipart streaming has buffer
|
||||
// issues over ~500 MB.
|
||||
// * Safari has a long-standing bug where the FormData clone for
|
||||
// large bodies hits a memory ceiling and aborts mid-upload.
|
||||
//
|
||||
// Easier to gate the importer than to chase per-browser workarounds.
|
||||
// Other admin pages don't have this constraint, so the warning only
|
||||
// shows on the import flow.
|
||||
|
||||
interface NavigatorWithUaData extends Navigator {
|
||||
userAgentData?: { brands: Array<{ brand: string; version: string }> };
|
||||
}
|
||||
|
||||
export function isChromium(): boolean {
|
||||
if (typeof navigator === 'undefined') return true; // SSR / tests
|
||||
// userAgentData is currently only implemented in Chromium-based
|
||||
// browsers — Firefox/Safari haven't shipped it. If it's present,
|
||||
// we're on Chromium.
|
||||
if ((navigator as NavigatorWithUaData).userAgentData) return true;
|
||||
// Fallback UA sniff for Chromium-derived browsers that haven't
|
||||
// exposed userAgentData yet (e.g. older Edge/Brave builds).
|
||||
const ua = navigator.userAgent;
|
||||
return /Chrome\/|Chromium\/|Edg\//.test(ua) && !/Firefox\/|FxiOS\//.test(ua);
|
||||
}
|
||||
Reference in New Issue
Block a user