This repository contains the platform-specific Adblock Plus source code for Chrome and Opera. It can be used to build Adblock Plus for these platforms, generic Adblock Plus code will be extracted from other repositories automatically (see dependencies file).
- Mercurial or Git (whichever you used to clone this repository)
- Python 2.7
- The Jinja2 module (>= 2.8)
- The PIL module
- For signed builds: PyCrypto module
Run the following command in the project directory:
./build.py -t chrome build -k adblockpluschrome.pem
This will create a build with a name in the form adblockpluschrome-1.2.3.nnnn.crx Note that you don't need an existing signing key for Chrome, a new key will be created automatically if the file doesn't exist.
To simplify the process of testing your changes you can create an unpacked development environment. For that run the following command:
./build.py -t chrome devenv
This will create a devenv.chrome directory in the repository. In Chrome you should load the directory as an unpacked extension. After making changes to the source code re-run the command to update the development environment, the extension should reload automatically after a few seconds.
To verify your changes you can use the unit test suite located in the qunit directory of the repository. In order to run the unit tests go to the extension's Options page, open the JavaScript Console and type in:
location.href = "qunit/index.html";
The unit tests will run automatically once the page loads.