Left: | ||
Right: |
LEFT | RIGHT |
---|---|
1 Shared Adblock Plus UI code | 1 Shared Adblock Plus UI code |
2 =========================== | 2 =========================== |
3 | 3 |
4 The user interface elements defined in this repository will be used by various | 4 The user interface elements defined in this repository will be used by various |
5 Adblock Plus products like Adblock Plus for Firefox. Their functionality can be | 5 Adblock Plus products like Adblock Plus for Firefox. Their functionality can be |
6 tested within this repository, even though they might not work exactly the same | 6 tested within this repository, even though they might not work exactly the same |
7 as they will do in the final product. | 7 as they will do in the final product. |
8 | 8 |
9 Directory structure | 9 Directory structure |
10 ------------------- | 10 ------------------- |
11 | 11 |
12 * Top-level files: HTML pages and scripts meant to be imported into the | 12 * Top-level files: HTML pages and scripts meant to be imported into the |
13 respective products. | 13 respective products. |
14 * `locale` directory: Localized strings, with one directory per locale. The | 14 * `locale` directory: Localized strings, with one directory per locale. The |
15 Firefox format for locale identifiers is used (xx-YY where xx is the language | 15 Firefox format for locale identifiers is used (xx-YY where xx is the language |
16 code and YY the optional region code). The localization strings themselves are | 16 code and YY the optional region code). The localization strings themselves are |
17 stored in the JSON format, like the one used by Chrome extensions. There is | 17 stored in the JSON format, like the one used by Chrome extensions. There is |
18 one JSON file per HTML page, file names of HTML page and JSON file should | 18 one JSON file per HTML page, file names of HTML page and JSON file should |
19 match. | 19 match. |
20 * `skin` directory: CSS files and any additional resources (images and fonts) | 20 * `skin` directory: CSS files and any additional resources (images and fonts) |
21 required for these. | 21 required for these. |
22 * `ext` directory: Test implementation of the abstraction layer. Is one should | 22 * `ext` directory: Test implementation of the abstraction layer. This one should |
23 *not to be imported*, these files should rather be replaced by | 23 *not to be imported*, these files should rather be replaced by |
24 product-specific versions providing the same interface. | 24 product-specific versions providing the same interface. |
25 | 25 |
26 Testing | 26 Testing |
27 ------- | 27 ------- |
28 | 28 |
29 In Firefox and Safari the HTML pages can be opened directly from the file system | 29 In Firefox and Safari the HTML pages can be opened directly from the file system |
30 and should be fully functional. Due to security restrictions in Chrome, there | 30 and should be fully functional. Due to security restrictions in Chrome, there |
31 you need to pass in the `--allow-file-access-from-files` command line flag when | 31 you need to pass in the `--allow-file-access-from-files` command line flag when |
32 starting the application. Alternatively, you can run `test_server.py` (requires | 32 starting the application. Alternatively, you can run `test_server.py` (requires |
33 Python 2.7 and [Flask](http://flask.pocoo.org/)) and open the HTML pages under | 33 Python 2.7) and open the HTML pages under URLs like |
34 URLs like `http://127.0.0.1:5000/firstRun.html`. | 34 `http://127.0.0.1:5000/firstRun.html`. |
35 | 35 |
36 Various aspects of the pages can be tested by setting parameters in the URL. The | 36 Various aspects of the pages can be tested by setting parameters in the URL. The |
37 only universal parameter is `locale`, e.g. `?locale=es-AR`. This parameter | 37 only universal parameter is `locale`, e.g. `?locale=es-AR`. This parameter |
38 overrides browser's locale which will be used by default. | 38 overrides browser's locale which will be used by default. |
39 | 39 |
40 firstRun.html | 40 firstRun.html |
41 ------------- | 41 ------------- |
42 | 42 |
43 This is the implementation of the Adblock Plus first-run page that will show up | 43 This is the implementation of the Adblock Plus first-run page that will show up |
44 whenever changes are applied automatically to user's Adblock Plus configuration. | 44 whenever changes are applied automatically to user's Adblock Plus configuration. |
45 This will usually happen when the user first installs Adblock Plus (initial | 45 This will usually happen when the user first installs Adblock Plus (initial |
46 setup), but it can also happen in the user's settings get lost for some reason. | 46 setup), but it can also happen in case the user's settings get lost. |
Thomas Greiner
2014/12/18 10:17:48
"in case the user's settings get lost"
Wladimir Palant
2014/12/18 19:31:35
Done.
| |
47 | 47 |
48 The behavior of this page is affected by a number of URL parameters: | 48 The behavior of this page is affected by a number of URL parameters: |
49 | 49 |
50 * `platform`, `platformVersion`, `application`, `applicationVersion`: sets | 50 * `platform`, `platformVersion`, `application`, `applicationVersion`: sets |
51 application parameters that are normally determined by Adblock Plus. Using | 51 application parameters that are normally determined by Adblock Plus. Using |
52 `?platform=safari&platformVersion=5.0` should trigger a warning. | 52 `?platform=safari&platformVersion=5.0` should trigger a warning. |
53 * `seenDataCorruption`, `filterlistsReinitialized`: setting these parameters to | 53 * `seenDataCorruption`, `filterlistsReinitialized`: setting these parameters to |
54 `true` should trigger warnings referring to issues detected by Adblock Plus. | 54 `true` should trigger warnings referring to issues detected by Adblock Plus. |
55 * `blockedURLs`: a comma-separated list of URLs that should be considered | 55 * `blockedURLs`: a comma-separated list of URLs that should be considered |
56 blocked (necessary to test the check for blocked scripts in sharing buttons). | 56 blocked (necessary to test the check for blocked scripts in sharing buttons). |
LEFT | RIGHT |