From 8bd099e27ad85a670350816b8c61b6a5353bca16 Mon Sep 17 00:00:00 2001 From: wearrrrr Date: Thu, 17 Oct 2024 20:09:51 -0500 Subject: [PATCH] fix for the innerHTML getter, spotify works now. --- src/client/dom/element.ts | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/src/client/dom/element.ts b/src/client/dom/element.ts index 9326c30..a657afe 100644 --- a/src/client/dom/element.ts +++ b/src/client/dom/element.ts @@ -213,12 +213,17 @@ export default function (client: ScramjetClient, self: typeof window) { }, get(ctx) { if (ctx.this instanceof self.HTMLScriptElement) { - return atob( - client.natives["Element.prototype.getAttribute"].call( - ctx.this, - "data-scramjet-script-source-src" - ) - ); + + const scriptSource = client.natives["Element.prototype.getAttribute"].call( + ctx.this, + "data-scramjet-script-source-src" + ) + + if (scriptSource) { + return atob(scriptSource); + } + + return ctx.get(); } if (ctx.this instanceof self.HTMLStyleElement) { return ctx.get();