Left: | ||
Right: |
LEFT | RIGHT |
---|---|
1 Adblock Plus for Chrome, Opera and Edge | 1 Adblock Plus for Chrome, Opera, Microsoft Edge and Firefox |
Sebastian Noack
2017/06/07 14:42:14
I wonder whether we should spell out "Micorosft Ed
kzar
2017/06/08 10:50:27
FWIW I agree.
Oleksandr
2017/06/14 03:41:01
Done.
| |
2 ======================================= | 2 ========================================================== |
3 | 3 |
4 This repository contains the platform-specific Adblock Plus source code for | 4 This repository contains the platform-specific Adblock Plus source code for |
5 Chrome, Opera and Edge. It can be used to build Adblock Plus for these | 5 Chrome, Opera, Microsoft Edge and Firefox. It can be used to build |
6 platforms, generic Adblock Plus code will be extracted from other repositories | 6 Adblock Plus for these platforms, generic Adblock Plus code will be extracted |
7 automatically (see _dependencies_ file). | 7 from other repositories automatically (see _dependencies_ file). |
8 | |
9 Note that the Firefox extension built from this repository is the new | |
10 [WebExtension](https://developer.mozilla.org/en-US/Add-ons/WebExtensions). | |
11 The source code of the legacy Adblock Plus extension | |
12 can be found [here](https://hg.adblockplus.org/adblockplus). | |
8 | 13 |
9 Building | 14 Building |
10 --------- | 15 --------- |
11 | 16 |
12 ### Requirements | 17 ### Requirements |
13 | 18 |
14 - [Mercurial](https://www.mercurial-scm.org/) or [Git](https://git-scm.com/) (wh ichever you used to clone this repository) | 19 - [Mercurial](https://www.mercurial-scm.org/) or [Git](https://git-scm.com/) (wh ichever you used to clone this repository) |
15 - [Python 2.7](https://www.python.org) | 20 - [Python 2.7](https://www.python.org) |
16 - [The Jinja2 module](http://jinja.pocoo.org/docs) (>= 2.8) | 21 - [The Jinja2 module](http://jinja.pocoo.org/docs) (>= 2.8) |
17 - [The PIL module](http://www.pythonware.com/products/pil/) | 22 - [The PIL module](http://www.pythonware.com/products/pil/) |
18 - For signed builds: [PyCrypto module](https://www.dlitz.net/software/pycrypto/) | 23 - For signed builds: [PyCrypto module](https://www.dlitz.net/software/pycrypto/) |
19 | 24 |
20 ### Building the extension | 25 ### Building the extension |
21 | 26 |
22 Run one of the following commands in the project directory, depending on your | 27 Run one of the following commands in the project directory, depending on your |
kzar
2017/06/08 10:50:27
Note: If the README changes for Firefox webext[1]
| |
23 target platform: | 28 target platform: |
24 | 29 |
25 ./build.py -t chrome build -k adblockpluschrome.pem | 30 ./build.py -t chrome build -k adblockpluschrome.pem |
26 ./build.py -t edge build | 31 ./build.py -t edge build |
Sebastian Noack
2017/06/07 14:42:14
Perhaps we should add a note below, that the gener
Oleksandr
2017/06/14 03:41:01
Done.
| |
32 ./build.py -t gecko-webext build | |
27 | 33 |
28 This will create a build with a name in the form | 34 This will create a build with a name in the form |
29 _adblockpluschrome-1.2.3.nnnn.crx_ or _adblockplusedge-1.2.3.nnnn.appx_. | 35 _adblockpluschrome-1.2.3.nnnn.crx_, _adblockplusedge-1.2.3.nnnn.appx_ or |
36 _adblockplusfirefox-1.2.3.nnnn.xpi_. | |
37 | |
30 Note that you don't need an existing signing key for Chrome, a new key | 38 Note that you don't need an existing signing key for Chrome, a new key |
31 will be created automatically if the file doesn't exist. | 39 will be created automatically if the file doesn't exist. |
40 | |
41 The Microsoft Edge build _adblockplusedge-1.2.3.nnnn.appx_ is unsigned and | |
42 is only useful for uploading into Windows Store, where it will be signed. For | |
43 testing use the devenv build. | |
44 | |
45 The Firefox extension will be unsigned, and therefore is mostly only useful for | |
46 upload to Mozilla Add-ons. You can also also load it for testing purposes under | |
47 _about:debugging_ or by disabling signature enforcement in Firefox Nightly. | |
32 | 48 |
33 ### Development environment | 49 ### Development environment |
34 | 50 |
35 To simplify the process of testing your changes you can create an unpacked | 51 To simplify the process of testing your changes you can create an unpacked |
36 development environment. For that run one of the following commands: | 52 development environment. For that run one of the following commands: |
37 | 53 |
38 ./build.py -t chrome devenv | 54 ./build.py -t chrome devenv |
39 ./build.py -t edge devenv | 55 ./build.py -t edge devenv |
56 ./build.py -t gecko-webext devenv | |
40 | 57 |
41 This will create a _devenv.platform_ directory in the repository. In Chrome you | 58 This will create a _devenv.*_ directory in the repository. You can load the |
kzar
2017/06/08 10:50:27
Nit: Blank line before "In Chrome"? I figure the f
| |
42 should load _devenv.chrome_ as an unpacked extension directory. After making | 59 directory as an unpacked extension, under _chrome://extensions_ in Chrome, |
43 changes to the source code re-run the command to update the development | 60 under _about:debugging_ in Firefox or in _Extensions_ menu in Microsoft Edge, |
44 environment, the extension should reload automatically after a few seconds. | 61 after enabling extension development features in _about:flags_. |
62 After making changes to the source code re-run the command to update the | |
63 development environment. In Chrome and Firefox the extension should reload | |
64 automatically after a few seconds. | |
45 | 65 |
46 For Edge you should load _devenv.edge/Extension_ as an unpacked extension | 66 Builds for Microsoft Edge do not automatically detect changes, so after |
47 directory. Edge build does not automatically detect changes, so after | |
48 rebuilding the extension you should manually force reloading it in Edge by | 67 rebuilding the extension you should manually force reloading it in Edge by |
49 hitting the _Reload Extension_ button. | 68 hitting the _Reload Extension_ button. |
50 | 69 |
51 Running the unit tests | 70 Running the unit tests |
52 ---------------------- | 71 ---------------------- |
53 | 72 |
54 To verify your changes you can use the unit test suite located in the _qunit_ | 73 To verify your changes you can use the unit test suite located in the _qunit_ |
55 directory of the repository. In order to run the unit tests go to the | 74 directory of the repository. In order to run the unit tests go to the |
56 extension's Options page, open the JavaScript Console and type in: | 75 extension's Options page, open the JavaScript Console and type in: |
57 | 76 |
58 location.href = "qunit/index.html"; | 77 location.href = "qunit/index.html"; |
59 | 78 |
60 The unit tests will run automatically once the page loads. | 79 The unit tests will run automatically once the page loads. |
61 | 80 |
62 Linting | 81 Linting |
63 ------- | 82 ------- |
64 | 83 |
65 You can lint the code using [ESLint](http://eslint.org). | 84 You can lint the code using [ESLint](http://eslint.org). |
66 | 85 |
67 eslint *.js lib/ qunit/ ext/ chrome/ | 86 eslint *.js lib/ qunit/ ext/ chrome/ |
68 | 87 |
69 You will need to set up ESLint and our configuration first, see | 88 You will need to set up ESLint and our configuration first, see |
70 [eslint-config-eyeo](https://hg.adblockplus.org/codingtools/file/tip/eslint-conf ig-eyeo) | 89 [eslint-config-eyeo](https://hg.adblockplus.org/codingtools/file/tip/eslint-conf ig-eyeo) |
71 for more information. | 90 for more information. |
LEFT | RIGHT |