Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
OutRed
GitHub Repository: OutRed/artclass
Path: blob/main/static/js/uv.js
595 views
1
function registerSW() {
2
navigator.serviceWorker.register('./loadsw.js', {
3
scope: __uv$config.prefix
4
})
5
}
6
7
function getLink(url) {
8
if (!__uv$config) throw new Error("UV is not imported")
9
try {
10
new URL(url)
11
} catch (e) {
12
throw new Error("Invalid URL provided!")
13
}
14
return __uv$config.prefix + __uv$config.encodeUrl(url);
15
}
16