add checkbox to disable speechtotext
This commit is contained in:
@@ -57,7 +57,7 @@ function log(message) {
|
||||
}
|
||||
|
||||
class CommandorPage {
|
||||
constructor(contact, device, mongoManager, selectedStore = DEFAULT_STORE) {
|
||||
constructor(contact, device, mongoManager, selectedStore = DEFAULT_STORE, audioAnalyse = false) {
|
||||
this.contact = contact;
|
||||
this.device = device;
|
||||
this.mongoManager = mongoManager;
|
||||
@@ -65,6 +65,7 @@ class CommandorPage {
|
||||
this.choosedStore = selectedStore
|
||||
this.isFillingFields = false;
|
||||
this.isTerminated = false;
|
||||
this.audioAnalyse = audioAnalyse;
|
||||
}
|
||||
|
||||
|
||||
@@ -294,7 +295,9 @@ class CommandorPage {
|
||||
let content = await currentPage.content();
|
||||
let captcha_url = "geo.captcha-delivery.com/captcha";
|
||||
if (content.toString().includes(captcha_url)) {
|
||||
await this.checkAudioBtn();
|
||||
if (this.audioAnalyse) {
|
||||
await this.checkAudioBtn();
|
||||
}
|
||||
for (let i = 0; i < 15; i++) {
|
||||
await delay(1000)
|
||||
shell.beep()
|
||||
@@ -325,8 +328,8 @@ class CommandorPage {
|
||||
if (audioBtn) {
|
||||
log("audioBtn found")
|
||||
audioBtn.click()
|
||||
let captchSolver = new GeoCaptchaSolver(this.page)
|
||||
captchSolver.solve()
|
||||
let captchaSolver = new GeoCaptchaSolver(this.page)
|
||||
await captchaSolver.solve()
|
||||
} else {
|
||||
log("audioBtn not found")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user