mirror of
https://github.com/MercuryWorkshop/scramjet.git
synced 2025-05-15 23:30:00 -04:00
cookies
This commit is contained in:
parent
7b8d5d09b2
commit
3bc8dd34b9
14 changed files with 144 additions and 93 deletions
|
@ -1,5 +1,5 @@
|
|||
import { createLocationProxy } from "./location";
|
||||
import { decodeUrl } from "./shared";
|
||||
import { CookieStore, decodeUrl } from "./shared";
|
||||
import { createDocumentProxy, createWindowProxy } from "./window";
|
||||
|
||||
declare global {
|
||||
|
@ -46,6 +46,8 @@ export class ScramjetClient {
|
|||
windowProxy: any;
|
||||
locationProxy: any;
|
||||
|
||||
cookieStore = new CookieStore();
|
||||
|
||||
eventcallbacks: Map<
|
||||
any,
|
||||
[
|
||||
|
@ -68,13 +70,17 @@ export class ScramjetClient {
|
|||
global[ScramjetClient.SCRAMJET] = this;
|
||||
}
|
||||
|
||||
loadcookies(cookiestr: string) {
|
||||
this.cookieStore.load(cookiestr);
|
||||
}
|
||||
|
||||
hook() {
|
||||
// @ts-ignore
|
||||
const context = import.meta.webpackContext(".", {
|
||||
recursive: true,
|
||||
});
|
||||
|
||||
let modules = [];
|
||||
const modules = [];
|
||||
|
||||
for (const key of context.keys()) {
|
||||
const module = context(key);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue