fix
Some checks failed
Deploy / deploy (push) Has been cancelled

This commit is contained in:
2025-10-15 19:43:32 +08:00
parent 43e0376fba
commit 07c67d2694
5 changed files with 13 additions and 9 deletions

View File

@@ -3,6 +3,7 @@ import { User } from "./types"
import { USER_TYPE } from "./constants"
import { strFromU8, strToU8, unzlibSync, zlibSync } from "fflate"
import copyTextFallback from "copy-text-to-clipboard"
import { customAlphabet } from "nanoid"
function calculateACRate(acCount: number, totalCount: number): string {
if (totalCount === 0) return "0.00"
@@ -227,6 +228,10 @@ export async function copyToClipboard(text: string): Promise<boolean> {
}
}
export function getRandomId() {
return customAlphabet("0123456789abcdefghijklmnopqrstuvwxyz")
}
// function getChromeVersion() {
// var raw = navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./)
// return raw ? parseInt(raw[2], 10) : 0