mirror of
https://github.com/MercuryWorkshop/scramjet.git
synced 2025-05-13 14:30:02 -04:00
remove useless logs
This commit is contained in:
parent
93db66ebc8
commit
dc490064d3
4 changed files with 2 additions and 7 deletions
|
@ -40,8 +40,7 @@ pub fn rewrite_js(js: &str, url: &str, encode: Function) -> Vec<u8> {
|
||||||
|
|
||||||
#[wasm_bindgen]
|
#[wasm_bindgen]
|
||||||
pub fn rewrite_js_from_arraybuffer(js: &[u8], url: &str, encode: Function) -> Vec<u8> {
|
pub fn rewrite_js_from_arraybuffer(js: &[u8], url: &str, encode: Function) -> Vec<u8> {
|
||||||
// technically slower than the c++ string conversion but it will create *less copies*
|
// we know that this is a valid utf-8 string
|
||||||
|
|
||||||
let js = unsafe { std::str::from_utf8_unchecked(js) };
|
let js = unsafe { std::str::from_utf8_unchecked(js) };
|
||||||
|
|
||||||
rewrite(
|
rewrite(
|
||||||
|
|
|
@ -58,8 +58,6 @@ export class ScramjetClient {
|
||||||
}
|
}
|
||||||
|
|
||||||
hook() {
|
hook() {
|
||||||
dbg.log("hwat");
|
|
||||||
|
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
const context = import.meta.webpackContext(".", {
|
const context = import.meta.webpackContext(".", {
|
||||||
recursive: true,
|
recursive: true,
|
||||||
|
@ -72,7 +70,6 @@ export class ScramjetClient {
|
||||||
(key.startsWith("./worker/") && "WorkerGlobalScope" in self) ||
|
(key.startsWith("./worker/") && "WorkerGlobalScope" in self) ||
|
||||||
key.startsWith("./shared/")
|
key.startsWith("./shared/")
|
||||||
) {
|
) {
|
||||||
console.log("??", key);
|
|
||||||
const module = context(key);
|
const module = context(key);
|
||||||
module.default(this, this.global);
|
module.default(this, this.global);
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,7 +5,7 @@ export default function (client: ScramjetClient, self: typeof window) {
|
||||||
client.Trap("Document.prototype.cookie", {
|
client.Trap("Document.prototype.cookie", {
|
||||||
get(ctx) {
|
get(ctx) {
|
||||||
const cookiestring = ctx.get();
|
const cookiestring = ctx.get();
|
||||||
dbg.log("original cookiestring", cookiestring);
|
// dbg.log("original cookiestring", cookiestring);
|
||||||
//
|
//
|
||||||
// if (!cookiestring) return "";
|
// if (!cookiestring) return "";
|
||||||
//
|
//
|
||||||
|
|
|
@ -14,7 +14,6 @@ declare global {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
export default function (client: ScramjetClient, self: typeof window) {
|
export default function (client: ScramjetClient, self: typeof window) {
|
||||||
dbg.log("RAN");
|
|
||||||
const attrObject = {
|
const attrObject = {
|
||||||
nonce: [self.HTMLElement],
|
nonce: [self.HTMLElement],
|
||||||
integrity: [self.HTMLScriptElement, self.HTMLLinkElement],
|
integrity: [self.HTMLScriptElement, self.HTMLLinkElement],
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue