mirror of
https://github.com/MercuryWorkshop/scramjet.git
synced 2025-05-13 14:30:02 -04:00
migrate to $scramjet object from __scramjet
This commit is contained in:
parent
146c202ae2
commit
cf9e5a3418
13 changed files with 77 additions and 67 deletions
|
@ -7,24 +7,11 @@ import { rewriteWorkers } from "./rewriters/worker";
|
|||
import { isScramjetFile } from "./rewriters/html";
|
||||
import { BareClient } from "@mercuryworkshop/bare-mux";
|
||||
|
||||
declare global {
|
||||
interface Window {
|
||||
__scramjet$bundle: {
|
||||
encodeUrl: typeof encodeUrl;
|
||||
decodeUrl: typeof decodeUrl;
|
||||
rewriteCss: typeof rewriteCss;
|
||||
rewriteHtml: typeof rewriteHtml;
|
||||
rewriteSrcset: typeof rewriteSrcset;
|
||||
rewriteJs: typeof rewriteJs;
|
||||
rewriteHeaders: typeof rewriteHeaders;
|
||||
rewriteWorkers: typeof rewriteWorkers;
|
||||
BareClient: typeof BareClient;
|
||||
isScramjetFile: typeof isScramjetFile
|
||||
}
|
||||
}
|
||||
if (!self.$scramjet) {
|
||||
//@ts-expect-error really dumb workaround
|
||||
self.$scramjet = {}
|
||||
}
|
||||
|
||||
self.__scramjet$bundle = {
|
||||
self.$scramjet.bundle = {
|
||||
encodeUrl,
|
||||
decodeUrl,
|
||||
rewriteCss,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue