feat(share): enable syntax highlighting

This commit is contained in:
Elian Doran
2025-06-09 18:22:30 +03:00
parent 54ffeeaed9
commit 1bcb811835
8 changed files with 82 additions and 47 deletions

View File

@@ -1,4 +1,5 @@
import server from "./server.js";
import { isShare } from "./utils.js";
type OptionValue = number | string;
@@ -7,7 +8,9 @@ class Options {
private arr!: Record<string, OptionValue>;
constructor() {
this.initializedPromise = server.get<Record<string, OptionValue>>("options").then((data) => this.load(data));
if (!isShare) {
this.initializedPromise = server.get<Record<string, OptionValue>>("options").then((data) => this.load(data));
}
}
load(arr: Record<string, OptionValue>) {