fix: redundant padding character in usercss id
This commit is contained in:
parent
141b1a7041
commit
b1bdc48769
|
@ -83,6 +83,10 @@ export async function compileUsercss(fileName: string) {
|
|||
// In default and USO, it has no special meaning, so we'll just leave it as a number.
|
||||
varsToPass[k] = varsToPass[k] === "1" ? "true" : "false";
|
||||
}
|
||||
|
||||
if (v.type === "range") {
|
||||
varsToPass[k] = `${varsToPass[k]}${v.units ?? "px"}`;
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
|
|
|
@ -34,5 +34,5 @@ export async function getUserCssId(header: UserstyleHeader): Promise<string> {
|
|||
|
||||
const idHash = await window.crypto.subtle.digest("SHA-256", new Uint8Array([...nameHash, ...namespaceHash]));
|
||||
|
||||
return window.btoa(String.fromCharCode(...new Uint8Array(idHash)));
|
||||
return window.btoa(String.fromCharCode(...new Uint8Array(idHash))).substring(0, 43); // base64 adds one more padding character
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue