diff --git a/src/equicordplugins/clipsEnhancements.discordDesktop/index.tsx b/src/equicordplugins/clipsEnhancements.discordDesktop/index.tsx index f665f465a..5c61f4973 100644 --- a/src/equicordplugins/clipsEnhancements.discordDesktop/index.tsx +++ b/src/equicordplugins/clipsEnhancements.discordDesktop/index.tsx @@ -43,6 +43,12 @@ const settings = definePluginSettings({ default: true, restartNeeded: true }, + ignorePlatformRestriction: { + type: OptionType.BOOLEAN, + description: "Allow Platform Restricted Clipping (may cause save errors)", + default: true, + restartNeeded: true + }, clipsLink: { type: OptionType.COMPONENT, description: "", @@ -95,7 +101,7 @@ export default definePlugin({ find: "2022-11_clips_experiment", replacement: { match: /defaultConfig:\{enableClips:!\d,ignorePlatformRestriction:!\d,showClipsHeaderEntrypoint:!\d,enableScreenshotKeybind:!\d,enableVoiceOnlyClips:!\d,enableAdvancedSignals:!\d\}/, - replace: "defaultConfig:{enableClips:!0,ignorePlatformRestriction:!0,showClipsHeaderEntrypoint:!0,enableScreenshotKeybind:$self.settings.store.enableScreenshotKeybind,enableVoiceOnlyClips:$self.settings.store.enableVoiceOnlyClips,enableAdvancedSignals:$self.settings.store.enableAdvancedSignals}" + replace: "defaultConfig:{enableClips:!0,ignorePlatformRestriction:$self.settings.store.ignorePlatformRestriction,showClipsHeaderEntrypoint:!0,enableScreenshotKeybind:$self.settings.store.enableScreenshotKeybind,enableVoiceOnlyClips:$self.settings.store.enableVoiceOnlyClips,enableAdvancedSignals:$self.settings.store.enableAdvancedSignals}" } }, { @@ -107,7 +113,7 @@ export default definePlugin({ } ], - patchTimeslots(timeslots) { + patchTimeslots(timeslots: { id: string; value: number; label: string; }[]) { const newTimeslots = [...timeslots]; extraTimeslots.forEach(timeslot => newTimeslots.push({ @@ -118,10 +124,10 @@ export default definePlugin({ }) })); - return newTimeslots.toSorted(); + return newTimeslots.sort((a, b) => a.value - b.value); }, - patchFramerates(framerates) { + patchFramerates(framerates: { id: string; value: number; label: string; }[]) { const newFramerates = [...framerates]; // Lower framerates than 15FPS have adverse affects on compression, 3 minute clips at 10FPS skyrocket the filesize to 200mb!! @@ -129,11 +135,11 @@ export default definePlugin({ id: `${framerate}fps`, value: framerate, label: getIntlMessage("SCREENSHARE_FPS_ABBREVIATED", { - count: framerate + fps: framerate }) })); - return newFramerates.toSorted(); + return newFramerates.sort((a, b) => a.value - b.value); }, getApplicationId(activityName: string) {