# 2Captcha Chrome Extension Mod

2captcha.zip
2captcha.zip

# Setting up the extension

The extension has many settings, including automatic solution of the specified type of captcha, support for proxy, and other settings. The settings are available in the file ./common/config.js. To add settings for the automatic reCAPTCHA V2 solution, you need to open the file ./common/config.js and change the value of the autoSolveRecaptchaV2 field to true.

Next, you need to configure the extension:

Enter your API key in the extension settings file ./common/config.js. Your key must be written to the value of the apiKey field. You can see and copy you're API key on the page.

Example: apiKey: "8080629c1221fdd82m8080000ff0c99c"

# How to disable opening the extension page after installation?

To do this, in the file ./manifest.json delete the following lines:

"options_ui": {
    "page": "options/options.html",
    "open_in_tab": true
},

# Checking the captcha status

After receiving a response from the service, the extension button .captcha-solver will change the value of the data attribute data-state. By observing the value of this data-state attribute, you can monitor the state of the extension. After solving the captcha, the value of this attribute will change to "solved".

Description of the values of the data-state attribute:

Attribute Description
data-state="ready" The extension is ready to solve the captcha. To send a captcha, you need to click on the button.
data-state="solving" Solving the captcha.
data-state="solved" Captcha has been successfully solved
data-state="error" An error when receiving a response or a captcha was not successfully solved.

At this step, you need to wait until the captcha is solved, after that the attribute value will change to "solved", this will signal the successful solution of the captcha. After this step, you can do the necessary actions.

// By default, waitForSelector waits for 30 seconds, but this time is usually not enough, so we specify the timeout value manually with the second parameter. The timeout value is specified in "ms".
await page.waitForSelector(`.captcha-solver[data-state="solved"]`, {
  timeout: 180000,
});