mirror of
https://github.com/MaintainTeam/LastPipeBender.git
synced 2025-02-28 21:38:20 +03:00
Use "this" instead of "globalThis" as global scope
globalThis was introduced only on newer versions of JS
This commit is contained in:
parent
a60bb3e7af
commit
056809cb0d
2 changed files with 3 additions and 3 deletions
|
@ -177,7 +177,7 @@ async function runBotGuard(rawChallengeData) {
|
|||
|
||||
const botguard = await BotGuardClient.create({
|
||||
globalName: challengeData.globalName,
|
||||
globalObj: globalThis,
|
||||
globalObj: this,
|
||||
program: challengeData.program
|
||||
});
|
||||
|
||||
|
|
|
@ -98,7 +98,7 @@ class PoTokenWebView private constructor(
|
|||
try {
|
||||
data = JSON.parse(String.raw`$responseBody`)
|
||||
result = await runBotGuard(data)
|
||||
globalThis.webPoSignalOutput = result.webPoSignalOutput
|
||||
this.webPoSignalOutput = result.webPoSignalOutput
|
||||
$JS_INTERFACE.onRunBotguardResult(result.botguardResponse)
|
||||
} catch (error) {
|
||||
$JS_INTERFACE.onJsInitializationError(error.toString())
|
||||
|
@ -139,7 +139,7 @@ class PoTokenWebView private constructor(
|
|||
webView.evaluateJavascript(
|
||||
"""(async function() {
|
||||
try {
|
||||
globalThis.integrityToken = JSON.parse(String.raw`$responseBody`)
|
||||
this.integrityToken = JSON.parse(String.raw`$responseBody`)
|
||||
$JS_INTERFACE.onInitializationFinished(integrityToken[1])
|
||||
} catch (error) {
|
||||
$JS_INTERFACE.onJsInitializationError(error.toString())
|
||||
|
|
Loading…
Add table
Reference in a new issue