Compare commits
4 Commits
fix/invoke
...
fix/hook-o
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2c3cfebe3a | ||
|
|
6265a9cdbf | ||
|
|
1321b498cf | ||
|
|
801d9778cb |
@@ -30,7 +30,7 @@ export const tts = {
|
||||
export type TTS = typeof tts
|
||||
|
||||
const calculateHookOn = (arr: (keyof TTS)[]) => {
|
||||
let s = '0x3e3ff5bf'
|
||||
let s = '0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffbfffff'
|
||||
arr.forEach(n => {
|
||||
let v = BigInt(s)
|
||||
v ^= BigInt(1) << BigInt(tts[n])
|
||||
|
||||
@@ -85,7 +85,8 @@ export const getInvokeOptions = (content?: string) => {
|
||||
export function toHex(str: string) {
|
||||
var result = ''
|
||||
for (var i = 0; i < str.length; i++) {
|
||||
result += str.charCodeAt(i).toString(16)
|
||||
const hex = str.charCodeAt(i).toString(16)
|
||||
result += hex.padStart(2, '0')
|
||||
}
|
||||
return result.toUpperCase()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user