add files

This commit is contained in:
DIVISIONSolar 2024-02-29 13:51:12 -05:00
parent 3d0042015a
commit 906d196c04
No known key found for this signature in database
GPG key ID: 76317ADB9BA48F72
16 changed files with 402 additions and 343 deletions

View file

@ -1,40 +0,0 @@
<p align="center"><img src="https://raw.githubusercontent.com/titaniumnetwork-dev/Ultraviolet-Static/main/public/uv.png" height="200"></p>
<h1 align="center">Ultraviolet-Static</h1>
Static files/assets used to spin up an Ultraviolet website.
## Install in [Ultraviolet-App](https://github.com/titaniumnetwork-dev/Ultraviolet-App.git)
See [Ultraviolet-App's Wiki](https://github.com/titaniumnetwork-dev/Ultraviolet-App/wiki/Customizing-your-frontend).
## Usage outside of Ultraviolet-App/Static hosting
### Ultraviolet scripts
This repository doesn't serve any Ultraviolet scripts. It has a `uv.config.js` to show how Ultraviolet is intended to work with this demo. Ultraviolet-App automatically merges our `uv.config.js` with the remaining UV scripts (`uv.sw.js`, `uv.client.js`, etc). **Some work has to be done in order to make this repository standalone.**
Here's how to get the remaining scripts for the purpose of hosting this repository:
1. Go to the [Ultraviolet releases](https://github.com/titaniumnetwork-dev/Ultraviolet/releases/)
2. Find the latest release
3. Download the latest tarball (eg. `titaniumnetwork-dev-ultraviolet-x.x.x.tgz`)
4. Open the tarball, navigate to the `dist` directory, and extract all the scripts with the exception of `uv.config.js` (we already have a configuration) into the `public/uv/` directory in this repository.
You may see `.map` files. These are used for debugging. If they're too large, you can omit them without any errors.
Do not copy `uv.config.js` from the archive!
### Bare server
You will need to point your Bare server to an external one/a different directory (if you're using reverse proxy software).
1. Open `public/uv/config.js`
2. Find the `bare` field
3. Replace `"/bare/"` with the address of your Bare server
A Bare server address hosts the Bare server. For example, to use the Holy Unblocker Bare server at https://uv.holyubofficial.net/ you would update your config to look like this:
```js
bare: "https://uv.holyubofficial.net/",
```
You can open Bare server addresses in your browser. You should see something containing fields like the project description, memory usage, supported versions, and the runtime/language.

6
package-lock.json generated
View file

@ -1,18 +1,18 @@
{
"name": "ultraviolet-static",
"name": "Revela-Frontend",
"version": "1.0.2",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "ultraviolet-static",
"name": "Revela-Frontend",
"version": "1.0.2",
"devDependencies": {
"eslint": "^8.23.0",
"prettier": "^2.7.1"
},
"peerDependencies": {
"@titaniumnetwork-dev/ultraviolet": "^2.0.0"
"@RevelaNetwork/Revela": "^2.0.0"
}
},
"node_modules/@eslint/eslintrc": {

View file

@ -1,5 +1,5 @@
{
"name": "ultraviolet-static",
"name": "Revela-Frontend",
"main": "lib/index.js",
"version": "1.0.2",
"type": "module",
@ -8,7 +8,7 @@
"lib"
],
"peerDependencies": {
"@titaniumnetwork-dev/ultraviolet": "^2.0.0"
"@RevelaNetwork/Revela-Frontend": "^2.0.0"
},
"devDependencies": {
"eslint": "^8.23.0",

View file

@ -1,51 +1,36 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta
name="viewport"
content="width=device-width, initial-scale=1.0, shrink-to-fit=no"
/>
<title>Ultraviolet | Error</title>
<meta
name="description"
content="Ultraviolet is a highly sophisticated proxy used for evading internet censorship or accessing websites in a controlled sandbox using the power of service-workers. Unblock sites today!"
/>
<meta
name="theme-color"
media="(prefers-color-scheme: dark)"
content="#434c5e"
/>
<meta name="googlebot" content="noindex, nofollow, nosnippet" />
<base href="/" />
<link rel="shortcut icon" content="favicon.ico" />
<link rel="stylesheet" href="index.css" />
</head>
<body>
<div class="logo-wrapper left-margin">
<h1>Ultraviolet | Error</h1>
</div>
<div class="desc left-margin">
<p>The server could not route your request.</p>
<p id="uv-error"></p>
<code id="uv-error-code"></code>
<button id="uv-register-sw" value="Register service worker">
Register ServiceWorker
</button>
</div>
<footer>
<a
title="License information"
href="credits.html"
style="margin-left: auto"
>Credits</a
>
<span>Ultraviolet &copy; TN 2022</span>
</footer>
<script src="uv/uv.bundle.js"></script>
<script src="uv/uv.config.js"></script>
<script src="register-sw.js"></script>
<script src="error.js"></script>
</body>
</html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no" />
<title>Revela | Error</title>
<meta name="description"
content="Revela is a highly sophisticated proxy used for evading internet censorship or accessing websites in a controlled sandbox using the power of service-workers. Unblock sites today!" />
<meta name="theme-color" media="(prefers-color-scheme: dark)" content="#434c5e" />
<meta name="googlebot" content="noindex, nofollow, nosnippet" />
<base href="/" />
<link rel="shortcut icon" content="favicon.ico" />
<link rel="stylesheet" href="index.css" />
</head>
<body>
<div class="logo-wrapper left-margin">
<h1>Revela | Error</h1>
</div>
<div class="desc left-margin">
<p>The server could not route your request. Try refreshing?</p>
<p id="uv-error"></p>
<code id="uv-error-code"></code>
<button id="uv-register-sw" value="Register service worker">
Register ServiceWorker
</button>
</div>
<script src="uv/uv.bundle.js"></script>
<script src="uv/uv.config.js"></script>
<script src="register-sw.js"></script>
<script src="error.js"></script>
</body>
</html>

BIN
public/5QEvQJ.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

17
public/cloak.js Normal file
View file

@ -0,0 +1,17 @@
function cloak() {
const newWindow = window.open('about:blank');
const iframe = newWindow.document.createElement('iframe');
newWindow.document.body.style.margin = '0';
iframe.style.width = '100%';
iframe.style.height = '100%';
iframe.style.position = 'fixed';
iframe.style.top = '0';
iframe.style.left = '0';
iframe.style.zIndex = '99999';
iframe.style.border = 'none';
newWindow.document.body.style.overflow = 'hidden';
newWindow.document.body.appendChild(iframe);
iframe.src = window.location.href;
window.location.replace('https://classroom.google.com/')
}

View file

@ -1,10 +1,10 @@
"use strict";
const error = document.getElementById("uv-error");
const errorCode = document.getElementById("uv-error-code");
const registerButton = document.getElementById("uv-register-sw");
const error = document.getElementById("rv-error");
const errorCode = document.getElementById("rv-error-code");
const registerButton = document.getElementById("rv-register-sw");
if (location.pathname.startsWith(__uv$config.prefix)) {
error.textContent = "Error: The service worker is not registered.";
error.textContent = "Error: The seuvice worker is not registered.";
registerButton.classList.add("show");
}
@ -13,7 +13,7 @@ registerButton.addEventListener("click", async () => {
await registerSW();
location.reload();
} catch (err) {
error.textContent = "Failed to register service worker.";
error.textContent = "Failed to register seuvice worker. Try refreshing?";
errorCode.textContent = err.toString();
registerButton.classList.remove("show");
}

4
public/gethost.php Normal file
View file

@ -0,0 +1,4 @@
<?php
$nodeId = shell_exec("hostname");
echo trim($nodeId);
?>

75
public/import.css vendored Normal file
View file

@ -0,0 +1,75 @@
@import url("https://fonts.bunny.net/css?family=abril-fatface:400|rubik:600,800i,900i");
body {
font-family: Abril-Fatface, Rubik;
margin: 0;
background: #111;
display: flex;
flex-direction: column;
min-height: 100vh;
}
/* Styles for the container */
.container {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
height: 100vh;
}
/* Styles for the image */
.image {
max-width: 300px;
}
/* Styles for the paragraph */
.paragraph h2 {
color: white;
margin-top: 25px;
text-align: center;
}
/* Styles for the buttons */
.buttons {
display: flex;
justify-content: center;
margin-top: 5px;
}
.buttons button {
margin: 0 10px;
}
/* Styles for the search bar */
.search-bar {
margin-top: -20px;
text-align: center;
}
/* Styles for Ad Banner */
.ad-banner {
display: flex;
justify-content: center;
align-items: center;
margin-top: 100px; /* Adjusted margin-top */
/* margin-bottom: -200px; */
}
.ad-banner img {
width: 512px;
height: 64px;
border-radius: 10px; /* Rounded corners */
}
/* Styles for the footers */
.footer {
display: flex;
justify-content: center;
align-items: center;
height: 60px;
background-color: #f5f5f5;
width: 100%;
position: fixed;
bottom: 0;
}

14
public/importhost.js Normal file
View file

@ -0,0 +1,14 @@
// Specify the URL of the PHP file
const phpFileUrl = './gethost.php';
// Fetch the content of the PHP file
fetch(phpFileUrl)
.then(response => response.text())
.then(content => {
// Update the content of the .node-id element
const nodeIdElement = document.querySelector('.node-id');
nodeIdElement.textContent = content;
})
.catch(error => {
console.error('Error fetching PHP file:', error);
});

View file

@ -1,45 +1,15 @@
@import url("https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,300;0,400;0,500;1,300;1,400&display=swap");
body {
font-family: "Roboto", Arial, Helvetica, sans-serif;
margin: 0;
background: #111;
display: flex;
flex-direction: column;
min-height: 100vh;
}
.fa-magnifying-glass {
color: white;
}
.flex-center {
display: flex;
justify-content: center;
}
.header-center {
align-items: center;
flex-direction: column;
margin-top: 10%;
}
.left-margin {
margin: 0px 16px;
}
#uv-error {
#rv-error {
color: #ff6666 !important;
white-space: pre-wrap;
}
#uv-error-code {
#rv-error-code {
font-size: 12px;
color: #fff;
font-family: "Courier New", Courier, monospace;
}
#uv-register-sw {
#rv-register-sw {
color: white;
background: #555555;
cursor: pointer;
@ -51,124 +21,181 @@ body {
display: none;
}
#uv-register-sw:active {
#rv-register-sw:active {
background: #333333;
}
#uv-register-sw.show {
#rv-register-sw.show {
display: block;
}
.logo {
width: 150px;
height: 150px;
}
.logo-wrapper .text {
font-size: 75px;
color: #fff;
}
.logo-wrapper h1 {
color: white;
}
footer {
margin: 0 5vw;
margin-top: auto;
display: flex;
flex-direction: column;
line-height: 30px;
margin-bottom: 20px;
}
footer > div {
display: flex;
justify-content: left;
align-items: center;
flex-wrap: wrap;
margin-bottom: 15px;
}
footer a,
footer span {
margin: 0 15px;
text-decoration: none;
color: #fff;
font-size: 15px;
}
footer a {
cursor: pointer;
}
footer a:hover {
text-decoration: underline;
}
.desc p {
width: 560px;
color: rgba(253, 253, 253, 0.514);
}
#uv-address {
.search-bar input[type="text"] {
background: none;
font-family: inherit;
padding: 0px 17px;
height: 48px;
border: 1px solid rgb(255, 255, 255, 0.2);
border: 1px solid rgba(255, 255, 255, 0.2);
color: var(--text-color);
border-radius: 3px;
outline: none;
width: 350px;
margin-top: 5px;
margin-top: 50px;
border-radius: 50px;
color: #fff;
transition: border-radius 0.1s;
}
#uv-address:focus {
.search-bar input[type="text"]:focus {
border: 1px solid rgba(253, 253, 253, 0.514);
border-radius: 6px;
}
.credit {
border-radius: 10px;
padding: 10px;
display: block;
border: #fff 1px solid;
color: #fff;
.footer {
background: #111;
margin-top: auto;
width: 93%;
align-self: center;
height: 80px;
display: flex;
flex-wrap: wrap;
margin-bottom: 15px;
justify-content: center;
align-items: center;
}
.credit label {
margin-left: auto;
margin-right: 15px;
.cloaker {
background: none;
font-family: inherit;
padding: 0px 17px;
height: 32px;
border: 1px solid rgb(255, 255, 255, 0.2);
color: var(--text-color);
border-radius: 3px;
outline: none;
width: 150px;
margin-top: 5px;
border-radius: 50px;
color: #fff;
transition: border-radius 0.1s;
margin-top: auto;
display: flex;
justify-content: center;
align-items: center;
display: inline-block;
position: relative;
}
.credit a,
.credit label {
color: white;
text-decoration: underline;
text-align: right;
.cloaker::before {
content: "";
position: absolute;
top: -5px;
right: -5px;
bottom: -5px;
left: -5px;
}
.credit pre {
display: none;
width: 100%;
.games {
background: none;
font-family: inherit;
padding: 0px 17px;
height: 32px;
border: 1px solid rgb(255, 255, 255, 0.2);
color: var(--text-color);
border-radius: 3px;
outline: none;
width: 160px;
margin-top: 5px;
border-radius: 50px;
color: #fff;
transition: border-radius 0.1s;
margin-top: auto;
display: flex;
justify-content: center;
align-items: center;
position: relative;
}
.credit label::after {
content: "show license";
cursor: pointer;
.games::before {
content: "";
position: absolute;
top: -5px;
right: -5px;
bottom: -5px;
left: -5px;
}
.credit input:checked + label::after {
content: "hide license";
.node {
background: none;
font-family: inherit;
padding: 0px 17px;
height: 32px;
border: 1px solid rgb(255, 255, 255, 0.2);
color: var(--text-color);
border-radius: 3px;
outline: none;
width: 165px;
margin-top: 5px;
border-radius: 50px;
color: #fff;
transition: border-radius 0.1s;
margin-top: auto;
display: flex;
align-items: center; /* Align the text and span vertically */
margin-bottom: 20px;
margin-right: 20px;
position: relative;
}
.credit input:checked ~ pre {
display: block;
.node::before {
content: "";
position: absolute;
top: -5px;
right: -5px;
bottom: -5px;
left: -5px;
}
.node-id {
margin-left: 5px; /* Add margin between "Node ID:" and the ID */
}
.stats {
background: none;
font-family: inherit;
padding: 0px 17px;
height: 32px;
border: 1px solid rgb(255, 255, 255, 0.2);
color: var(--text-color);
border-radius: 3px;
outline: none;
width: 150px;
margin-top: 5px;
border-radius: 50px;
color: #fff;
transition: border-radius 0.1s;
margin-top: auto;
display: flex;
justify-content: center;
align-items: center;
margin-bottom: 20px;
}
.credits {
background: none;
font-family: inherit;
padding: 0px 17px;
height: 32px;
border: 1px solid rgb(255, 255, 255, 0.2);
color: var(--text-color);
border-radius: 3px;
outline: none;
width: 150px;
margin-top: 5px;
border-radius: 50px;
color: #fff;
transition: border-radius 0.1s;
margin-top: auto;
display: flex;
justify-content: center;
align-items: center;
margin-right: 20px; /* Add margin to the right side */
margin-bottom: 20px; /* Add margin to the bottom */
}

View file

@ -1,119 +1,71 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta
name="viewport"
content="width=device-width, initial-scale=1.0, shrink-to-fit=no"
/>
<title>Ultraviolet | Sophisticated Web Proxy</title>
<meta
name="description"
content="Ultraviolet is a highly sophisticated proxy used for evading internet censorship or accessing websites in a controlled sandbox using the power of service-workers. Unblock sites today!"
/>
<meta
name="keywords"
content="proxy, web proxy, ultraviolet, service workers, unblock websites, unblock chromebook, free web proxy, proxy list, proxy sites, un block chromebook, online proxy, proxy server, proxysite, proxy youtube, bypass securly, bypass iboss, bypass lightspeed filter, holy unblocker, chromebooks, titanium network, unblock youtube, youtube proxy, unblocked youtube, youtube unblocked"
/>
<meta
name="theme-color"
media="(prefers-color-scheme: dark)"
content="#434c5e"
/>
<meta name="googlebot" content="index, follow, snippet" />
<link rel="shortcut icon" content="favicon.ico" />
<link rel="stylesheet" href="index.css" />
<script src="uv/uv.bundle.js" defer></script>
<script src="uv/uv.config.js" defer></script>
<script src="register-sw.js" defer></script>
<script src="search.js" defer></script>
<script src="index.js" defer></script>
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "FAQPage",
"mainEntity": [
{
"@type": "Question",
"name": "What is Ultraviolet (Web Proxy)?",
"acceptedAnswer": {
"@type": "Answer",
"text": "Highly sophisticated proxy used for evading internet censorship or accessing websites in a controlled sandbox using the power of service-workers and more!"
}
},
{
"@type": "Question",
"name": "How do I unblock sites using Ultraviolet?",
"acceptedAnswer": {
"@type": "Answer",
"text": "Simply head to an official site featuring Ultraviolet such as Holy Unblocker or Incognito! You can also self-host Ultraviolet on your own web server for maximum privacy."
}
},
{
"@type": "Question",
"name": "What if Ultraviolet is blocked or not working?",
"acceptedAnswer": {
"@type": "Answer",
"text": "Join the Titanium Network Discord at discord.gg/unblock!"
}
}
]
}
</script>
</head>
<body>
<div
title="Ultraviolet Logo"
class="flex-center logo-wrapper header-center"
>
<img class="logo" src="uv.png" alt="Ultraviolet" />
<h1>Ultraviolet | TN</h1>
<html lang="en">
<head>
<!-- Meta Data -->
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name ="title" content ="Revela | Sophisticated Web Proxy"/>
<meta name ="description" content ="A Sophisticated Web Proxy that allows you to browse the web anonymously and securely."/>
<meta property ="og:type" content ="website"/>
<meta property ="og:url" content ="https://revela.network"/>
<meta property ="og:title" content ="Revela | Sophisticated Web Proxy"/>
<meta property ="og:description" content ="A Sophisticated Web Proxy that allows you to browse the web anonymously and securely."/>
<meta property ="og:image" content ="https://cdn.joshsevero.dev/Static/Media/5QEvQJ.png"/>
<meta property ="twitter:card" content ="summary_large_image"/>
<meta property ="twitter:url" content ="https://revela.network"/>
<meta property ="twitter:title" content ="Revela | Sophisticated Web Proxy"/>
<meta property ="twitter:description" content ="A Sophisticated Web Proxy that allows you to browse the web anonymously and securely."/>
<meta property ="twitter:image" content ="https://cdn.joshsevero.dev/Static/Media/5QEvQJ.png"/>
<script data-name="BMC-Widget" data-cfasync="false" src="https://cdnjs.buymeacoffee.com/1.0.0/widget.prod.min.js" data-id="joshsevero" data-description="Support me on Buy me a coffee!" data-message="Help keep this website online by donating!" data-color="#40DCA5" data-position="Right" data-x_margin="18" data-y_margin="18"></script>
<!-- Meta Data -->
<!-- Scripts -->
<script src="uv/uv.bundle.js" defer></script>
<script src="uv/uv.config.js" defer></script>
<script src="register-sw.js" defer></script>
<script src="search.js" defer></script>
<script src="index.js" defer></script>
<script src="cloak.js"></script>
<!-- <script src="importhost.js"></script> -->
<!-- Scripts -->
<!-- CSS -->
<link rel="stylesheet" href="import.css" />
<link rel="stylesheet" href="index.css" />
<!-- CSS -->
</head>
<body>
<div class="container">
<img class="image" src="/5QEvQJ.png">
<div class="paragraph">
<h2>A Sophisticated Web Proxy that allows you to browse the web anonymously and securely.</h2>
</div>
<div class="flex-center desc left-margin">
<p>
Ultraviolet is highly sophisticated proxy used for evading internet
censorship.
<div class="buttons">
<button onclick="cloak()" class="cloaker">Activate Cloaker</button>
<button onclick="window.location.href='https://' + window.location.hostname + '/games';" class="games">Games</button>
</div>
<div class="search-bar">
<form id="rv-form">
<input type="hidden" value="https://duckduckgo.com/?q=%s" id="rv-search-engine" />
<input type="text" id="rv-address" placeholder="Search the web without being censored" />
</form>
</div>
<div class="footer">
<button class="credits" title="Credits" onclick="window.location.href='https://' + window.location.hostname + '/other/credits';">Credits</button>
<button class="node" title="Node ID">
Node ID:
<span class="node-id"></span>
</button>
<button class="stats" title="System Stats" onclick="window.location.href='https://status.revela.network';">System Stats</button>
</div>
<div class="ad-banner">
<a href="https://billing.glasshost.net/aff.php?aff=16"><img src="/pFGAHZ.gif" alt="GlassHost"></a>
</div>
<div class="error">
<p id="rv-error">
<pre id="rv-error-code"></pre>
</p>
</div>
<form id="uv-form" class="flex-center">
<input
id="uv-search-engine"
value="https://www.google.com/search?q=%s"
type="hidden"
/>
<input id="uv-address" type="text" placeholder="Search the web freely" />
</form>
<div class="desc left-margin">
<p id="uv-error"></p>
<pre id="uv-error-code"></pre>
</div>
<footer>
<div>
<a
title="The TitaniumNetwork GitHub organization"
href="https://github.com/titaniumnetwork-dev"
>TitaniumNetwork</a
>
<a title="The TitaniumNetwork Discord" href="https://discord.gg/unblock"
>Discord</a
>
<a
title="The TompHTTP GitHub organization"
href="https://github.com/tomphttp"
>TompHTTP</a
>
<a
title="The official deployment repository for Ultraviolet"
href="https://github.com/titaniumnetwork-dev/Ultraviolet-App"
>GitHub</a
>
<a title="License information" href="credits.html">Credits</a>
</div>
<div>
<span>Ultraviolet &copy; TN 2023</span>
</div>
</footer>
</body>
</div>
</body>
</html>

View file

@ -2,23 +2,23 @@
/**
* @type {HTMLFormElement}
*/
const form = document.getElementById("uv-form");
const form = document.getElementById("rv-form");
/**
* @type {HTMLInputElement}
*/
const address = document.getElementById("uv-address");
const address = document.getElementById("rv-address");
/**
* @type {HTMLInputElement}
*/
const searchEngine = document.getElementById("uv-search-engine");
const searchEngine = document.getElementById("rv-search-engine");
/**
* @type {HTMLParagraphElement}
*/
const error = document.getElementById("uv-error");
const error = document.getElementById("rv-error");
/**
* @type {HTMLPreElement}
*/
const errorCode = document.getElementById("uv-error-code");
const errorCode = document.getElementById("rv-error-code");
form.addEventListener("submit", async (event) => {
event.preventDefault();

View file

@ -0,0 +1,26 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no" />
<title>Revela | Credits</title>
<meta name="description"
content="Revela is a highly sophisticated proxy used for evading internet censorship or accessing websites in a controlled sandbox using the power of service-workers. Unblock sites today!" />
<meta name="theme-color" media="(prefers-color-scheme: dark)" content="#434c5e" />
<meta name="googlebot" content="noindex, nofollow, nosnippet" />
<base href="/" />
<link rel="shortcut icon" content="favicon.ico" />
<link rel="stylesheet" href="index.css" />
</head>
<body>
<div class="logo-wrapper left-margin">
<h1>Revela | Credits</h1>
</div>
<div class="desc left-margin">
<p>Our backend: <a href="https://github.com/titaniumnetwork-dev/Ultraviolet">Ultraviolet</a></p>
</div>
</body>
</html>

View file

@ -5,7 +5,7 @@
const stockSW = "/uv/sw.js";
/**
* List of hostnames that are allowed to run serviceworkers on http://
* List of hostnames that are allowed to run serviceworkers on http:
*/
const swAllowedHostnames = ["localhost", "127.0.0.1"];
@ -14,15 +14,14 @@ const swAllowedHostnames = ["localhost", "127.0.0.1"];
* Used in 404.html and index.html
*/
async function registerSW() {
if (!navigator.serviceWorker) {
if (
location.protocol !== "https:" &&
!swAllowedHostnames.includes(location.hostname)
)
throw new Error("Service workers cannot be registered without https.");
if (
location.protocol !== "https:" &&
!swAllowedHostnames.includes(location.hostname)
)
throw new Error("Service workers cannot be registered without https.");
if (!navigator.serviceWorker)
throw new Error("Your browser doesn't support service workers.");
}
// Ultraviolet has a stock `sw.js` script.
await navigator.serviceWorker.register(stockSW, {

View file

@ -1,4 +1,4 @@
// This file overwrites the stock UV config.js
// This file overwrites the stock uv config.js
self.__uv$config = {
prefix: "/uv/service/",