From 3b79fccaa3d629b1f6e32994a62e67bf962294f0 Mon Sep 17 00:00:00 2001 From: supernova <76390419+driedpampas@users.noreply.github.com> Date: Sat, 14 Oct 2023 13:23:28 +0300 Subject: [PATCH] fix: letsboost Co-Authored-By: NotAProton --- src/bypasses/letsboost.js | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/src/bypasses/letsboost.js b/src/bypasses/letsboost.js index 09c2ee5a3..91d685c98 100644 --- a/src/bypasses/letsboost.js +++ b/src/bypasses/letsboost.js @@ -2,14 +2,22 @@ import BypassDefinition from './BypassDefinition.js' export default class Letsboost extends BypassDefinition { constructor() { - super() - this.ensure_dom = true + super(); + this.ensure_dom = true; } execute() { - const jsonDat = window.JSON.parse(stepDat); - this.helpers.safelyNavigate(jsonDat[jsonDat.length-1]["url"]); + alert("FastForward: If nothing happens in a few seconds, the bypass couldn't be executed. Please disable your ad blocker and refresh the page. Press OK to continue."); + this.helpers.insertInfoBox("If nothing happens in a few seconds, the bypass couldn't be executed. Please disable your ad blocker and refresh the page."); + this.helpers.awaitElement("script:last-of-type:not([src])", () => { + const lastScript = document.getElementsByTagName('script')[document.getElementsByTagName('script').length - 1]; + const scriptContent = lastScript.innerHTML; + const jsonDat = JSON.parse(scriptContent.match(/stepDat = '(.*)';/)[1]); + const url = jsonDat[jsonDat.length-1]["url"]; + this.helpers.safelyNavigate(url); + }); } } -export const matches = ['letsboost.net'] \ No newline at end of file + +export const matches = ['letsboost.net']; \ No newline at end of file