fix: hotkey scope

This commit is contained in:
AncTe committed 2023-11-18 11:33:24 +08:00
1 parent ed80fba4c9
commit 80e20b1cdc
2 files changed
+11 -2

No files matched your search

+7
View File
@@ -271,6 +271,13 @@ export function deleteWith<T>(arr: T[], ele: T): T[] {
return arr;
}
export function spliceBy<T>(arr: T[], from: T): T[] {
const index = arr.indexOf(from);
if (index === -1) return arr;
arr.splice(index);
return arr;
}
export async function triggerFullscreen(full: boolean) {
const { maxGameScale } = core.plugin.utils;
if (!!document.fullscreenElement && !full) {