Skip to content

Commit 634fe6c

Browse files
authored
Merge pull request #1175 from driedpampas/fix-letsboost
fix: letsboost
2 parents 45d4136 + 3b79fcc commit 634fe6c

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

src/bypasses/letsboost.js

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,22 @@ import BypassDefinition from './BypassDefinition.js'
22

33
export default class Letsboost extends BypassDefinition {
44
constructor() {
5-
super()
6-
this.ensure_dom = true
5+
super();
6+
this.ensure_dom = true;
77
}
88

99
execute() {
10-
const jsonDat = window.JSON.parse(stepDat);
11-
this.helpers.safelyNavigate(jsonDat[jsonDat.length-1]["url"]);
10+
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.");
11+
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.");
12+
this.helpers.awaitElement("script:last-of-type:not([src])", () => {
13+
const lastScript = document.getElementsByTagName('script')[document.getElementsByTagName('script').length - 1];
14+
const scriptContent = lastScript.innerHTML;
15+
const jsonDat = JSON.parse(scriptContent.match(/stepDat = '(.*)';/)[1]);
16+
const url = jsonDat[jsonDat.length-1]["url"];
17+
this.helpers.safelyNavigate(url);
18+
});
1219
}
1320
}
1421

15-
export const matches = ['letsboost.net']
22+
23+
export const matches = ['letsboost.net'];

0 commit comments

Comments
 (0)