[Main] Assign vendetta_theme.json to window
This commit is contained in:
parent
af15e80ccd
commit
cbe425108e
2 changed files with 7 additions and 1 deletions
|
|
@ -1 +1 @@
|
|||
this.__vendetta_loader={name:"VendettaTweak",features:{loaderConfig:true,devtools:{prop:"__vendetta_rdc",version:"4.27.1"}}};
|
||||
this.__vendetta_loader={name:"VendettaTweak",features:{loaderConfig:true,devtools:{prop:"__vendetta_rdc",version:"4.27.1"},themes:{prop:"__vendetta_theme"}}};
|
||||
|
|
@ -82,6 +82,12 @@ class LoadHook: ClassHook<RCTCxxBridge> {
|
|||
os_log("Executing original script", log: vendettaLog, type: .info)
|
||||
orig.executeApplicationScript(script, url: url, async: false)
|
||||
|
||||
if let themeString = try? String(
|
||||
contentsOf: documentDirectory.appendingPathComponent("vendetta_theme.json"))
|
||||
{
|
||||
orig.executeApplicationScript(
|
||||
"this.__vendetta_theme=\(themeString)".data(using: .utf8)!, url: source, async: false)
|
||||
}
|
||||
if vendetta != nil {
|
||||
os_log("Executing vendetta.js", log: vendettaLog, type: .info)
|
||||
orig.executeApplicationScript(vendetta!, url: source, async: false)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue