OLD | NEW |
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: | 12 * Top-level files: |
13 * `firstRun.html` and `firstRun.js`: First-run page, see below | 13 * `firstRun.html` and `firstRun.js`: First-run page, see below |
14 * `i18n.js`: Localization functions, should be included by all pages. | 14 * `i18n.js`: Localization functions, should be included by all pages. |
15 * `messageResponder.js`: Script to be used on the background page to respond | 15 * `messageResponder.js`: Script to be used on the background page to respond |
16 to messages sent by UI code. | 16 to messages sent by UI code. |
17 * `background.html`, `background.js`: Test implementation of the background | 17 * `background.html`, `background.js`: Test implementation of the background |
18 page, should *not be imported*. | 18 page, should *not be imported*. |
19 * `desktop-options.html`, `desktop-options.js`: Options page, see below | 19 * `desktop-options.html`, `desktop-options.js`: Options page, see below |
20 * `subscriptions.xml`: Test subscription data, should *not be imported* | 20 * `subscriptions.xml`: Test subscription data, should *not be imported* |
| 21 * `polyfill.js`: Browser API polyfills, should *not be imported* |
21 * `locale` directory: Localized strings, with one directory per locale. The | 22 * `locale` directory: Localized strings, with one directory per locale. The |
22 Firefox format for locale identifiers is used (xx-YY where xx is the language | 23 Firefox format for locale identifiers is used (xx-YY where xx is the language |
23 code and YY the optional region code). The localization strings themselves are | 24 code and YY the optional region code). The localization strings themselves are |
24 stored in the JSON format, like the one used by Chrome extensions. There is | 25 stored in the JSON format, like the one used by Chrome extensions. There is |
25 one JSON file per HTML page, file names of HTML page and JSON file should | 26 one JSON file per HTML page, file names of HTML page and JSON file should |
26 match. | 27 match. |
27 * `skin` directory: CSS files and any additional resources (images and fonts) | 28 * `skin` directory: CSS files and any additional resources (images and fonts) |
28 required for these. | 29 required for these. |
29 * `ext` directory: Test implementation of the abstraction layer. This one should | 30 * `ext` directory: Test implementation of the abstraction layer. This one should |
30 *not to be imported*, these files should rather be replaced by | 31 *not to be imported*, these files should rather be replaced by |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 Linting | 112 Linting |
112 ------- | 113 ------- |
113 | 114 |
114 You can lint the code using [ESLint](http://eslint.org). | 115 You can lint the code using [ESLint](http://eslint.org). |
115 | 116 |
116 eslint *.js lib ext | 117 eslint *.js lib ext |
117 | 118 |
118 You will need to set up ESLint and our configuration first, see | 119 You will need to set up ESLint and our configuration first, see |
119 [eslint-config-eyeo](https://hg.adblockplus.org/codingtools/file/tip/eslint-conf
ig-eyeo) | 120 [eslint-config-eyeo](https://hg.adblockplus.org/codingtools/file/tip/eslint-conf
ig-eyeo) |
120 for more information. | 121 for more information. |
OLD | NEW |