Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
NebulaServices
GitHub Repository: NebulaServices/Nebula
Path: blob/main/public/uv/uv.config.js
976 views
1
self.__uv$config = {
2
prefix: "/~/uv/",
3
bare: "/bare/",
4
encodeUrl: function encode(str) {
5
if (!str) return str;
6
return encodeURIComponent(
7
str
8
.toString()
9
.split("")
10
.map((char, ind) => (ind % 2 ? String.fromCharCode(char.charCodeAt() ^ 3) : char))
11
.join("")
12
);
13
},
14
decodeUrl: function decode(str) {
15
if (!str) return str;
16
let [input, ...search] = str.split("?");
17
18
return (
19
decodeURIComponent(input)
20
.split("")
21
.map((char, ind) => (ind % 2 ? String.fromCharCode(char.charCodeAt(0) ^ 3) : char))
22
.join("") + (search.length ? "?" + search.join("?") : "")
23
);
24
},
25
handler: "/uv/uv.handler.js",
26
client: "/uv/uv.client.js",
27
bundle: "/uv/uv.bundle.js",
28
config: "/uv/uv.config.js",
29
sw: "/uv/uv.sw.js"
30
};
31
32