[Main] Switch to globalThis

This commit is contained in:
Jack Matthews 2023-05-13 03:12:30 -04:00
parent 18fbf6da49
commit db8890626e
No known key found for this signature in database
2 changed files with 2 additions and 2 deletions

View file

@ -1 +1 @@
this.__vendetta_loader={name:"VendettaTweak",features:{loaderConfig:true,devtools:{prop:"__vendetta_rdc",version:"4.27.1"},themes:{prop:"__vendetta_theme"}}};
globalThis.__vendetta_loader={name:"VendettaTweak",features:{loaderConfig:true,devtools:{prop:"__vendetta_rdc",version:"4.27.1"},themes:{prop:"__vendetta_theme"}}};

View file

@ -88,7 +88,7 @@ class LoadHook: ClassHook<RCTCxxBridge> {
contentsOf: documentDirectory.appendingPathComponent("vendetta_theme.json"))
{
orig.executeApplicationScript(
"this.__vendetta_theme=\(themeString)".data(using: .utf8)!, url: source, async: false)
"globalThis.__vendetta_theme=\(themeString)".data(using: .utf8)!, url: source, async: false)
let theme = try? JSONDecoder().decode(Theme.self, from: themeString.data(using: .utf8)!)
if let semanticColors = theme?.data.semanticColors { swizzleDCDThemeColor(semanticColors) }
if let rawColors = theme?.data.rawColors { swizzleUIColor(rawColors) }