Block registry api
This commit is contained in:
@@ -125,12 +125,3 @@ function script_of(mod: ServerModSource) {
|
||||
config: mod.data.config ?? {},
|
||||
};
|
||||
}
|
||||
|
||||
export function data_url(code: string) {
|
||||
const bytes = new TextEncoder().encode(code);
|
||||
let binary = "";
|
||||
for (let i = 0; i < bytes.length; i += 0x8000) {
|
||||
binary += String.fromCharCode(...bytes.subarray(i, i + 0x8000));
|
||||
}
|
||||
return `data:application/javascript;base64,${btoa(binary)}`;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user