retronbv / Ultraviolet-Static

Frontend source of the official Ultraviolet site. Bundled asset for an Ultraviolet environment.

Home Page:https://ultravioletsw.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ultraviolet-scripts

Core Ultraviolet scripts

Configuration

Configure Ultraviolet for both client-hooking & service worker in uv.config.js

self.__uv$config = {
    bare: '/bare/',
    prefix: '/service/',
    encodeUrl: Ultraviolet.codec.xor.encode,
    decodeUrl: Ultraviolet.codec.xor.decode,
    handler: '/uv.handler.js',
    bundle: '/uv.bundle.js',
    config: '/uv.config.js',
};

Example Usage

importScripts('/PATHTOSCRIPTS/uv.sw.js');

const sw = new UVServiceWorker();

self.addEventListener('fetch', event =>
    event.respondWith(
        sw.fetch(event)
    )
);

About

Frontend source of the official Ultraviolet site. Bundled asset for an Ultraviolet environment.

https://ultravioletsw.dev


Languages

Language:JavaScript 98.0%Language:HTML 1.9%Language:CSS 0.1%