mirror of
https://github.com/MercuryWorkshop/scramjet.git
synced 2025-05-16 07:30:02 -04:00
misc refactors
This commit is contained in:
parent
819c1701d0
commit
0939dd2b57
25 changed files with 82 additions and 66 deletions
|
@ -1,5 +1,5 @@
|
|||
import { ScramjetClient } from "../client";
|
||||
import { config, rewriteJs } from "../shared";
|
||||
import { config, rewriteJs } from "../../shared";
|
||||
|
||||
export default function (client: ScramjetClient, self: Self) {
|
||||
// used for proxying *direct eval*
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { ScramjetClient, ProxyCtx, Proxy } from "../client";
|
||||
import { rewriteJs } from "../shared";
|
||||
import { rewriteJs } from "../../shared";
|
||||
|
||||
function rewriteFunction(ctx: ProxyCtx) {
|
||||
const stringifiedFunction = ctx.fn(...ctx.args).toString();
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { ScramjetClient } from "../client";
|
||||
import { config, encodeUrl } from "../shared";
|
||||
import { config, encodeUrl } from "../../shared";
|
||||
|
||||
export default function (client: ScramjetClient, self: Self) {
|
||||
const Function = client.natives.Function;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { ScramjetClient } from "../client";
|
||||
import { config } from "../shared";
|
||||
import { config } from "../../shared";
|
||||
|
||||
export const POLLUTANT = Symbol.for("scramjet realm pollutant");
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
import { isemulatedsw } from "../..";
|
||||
import { decodeUrl } from "../../../shared/rewriters/url";
|
||||
import { ScramjetClient } from "../../client";
|
||||
import { encodeUrl, rewriteHeaders } from "../../shared";
|
||||
import { encodeUrl, rewriteHeaders } from "../../../shared";
|
||||
|
||||
export default function (client: ScramjetClient, self: typeof globalThis) {
|
||||
client.Proxy("fetch", {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { iswindow, isworker } from "../..";
|
||||
import { ScramjetClient } from "../../client";
|
||||
import { BareClient } from "../../shared";
|
||||
import { BareClient } from "../../../shared";
|
||||
|
||||
const bare = iswindow && new BareClient();
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { encodeUrl, rewriteHeaders } from "../../shared";
|
||||
import { encodeUrl, rewriteHeaders } from "../../../shared";
|
||||
|
||||
export default function (client, self) {
|
||||
client.Proxy("XMLHttpRequest.prototype.open", {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { encodeUrl } from "../shared";
|
||||
import { encodeUrl } from "../../shared";
|
||||
import { ScramjetClient } from "../client";
|
||||
|
||||
export default function (client: ScramjetClient, self: typeof globalThis) {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { iswindow, isworker } from "..";
|
||||
import { SCRAMJETCLIENT } from "../../symbols";
|
||||
import { ScramjetClient } from "../client";
|
||||
import { config } from "../shared";
|
||||
import { config } from "../../shared";
|
||||
|
||||
export function createWrapFn(client: ScramjetClient, self: typeof globalThis) {
|
||||
return function (identifier: any, args: any) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue