├── .gitignore ├── .travis.yml ├── .web-extension-id ├── LICENSE ├── README.md ├── docs ├── kpi-1.png ├── metrics.md ├── page-action-screenshot.png ├── pop-up-screenshot.png ├── profile-editor-screenshot.png └── testplan.md ├── package.json ├── src ├── css │ ├── foundation.min.css │ └── popup.css ├── html │ └── popup.html ├── img │ ├── blok-48.png │ ├── blok-96.png │ ├── tracking-protection-16.png │ ├── tracking-protection-32.png │ ├── tracking-protection-disabled-16.png │ └── tracking-protection-disabled-32.png ├── js │ ├── background.js │ ├── canonicalize.js │ ├── disconnect-blocklist.json │ ├── disconnect-entitylist.json │ ├── lists.js │ ├── log.js │ ├── popup.js │ └── requests.js └── manifest.json ├── tests ├── blocklist-fixture.json ├── entitylist-fixture.json ├── test-canonicalize.js ├── test-lists.js └── test-requests.js └── web-ext-artifacts ├── blok-0.1-fx.xpi ├── blok-0.1.1-fx.xpi ├── blok-0.1.10-fx.xpi ├── blok-0.1.11-fx.xpi ├── blok-0.1.12+fx.xpi ├── blok-0.1.13-fx+an.xpi ├── blok-0.1.14-an+fx.xpi ├── blok-0.1.2-fx.xpi ├── blok-0.1.3-fx.xpi ├── blok-0.1.4-fx.xpi ├── blok-0.1.5-fx.xpi ├── blok-0.1.6-fx.xpi ├── blok-0.1.7-fx.xpi ├── blok-0.1.8-fx.xpi ├── blok-0.1.9-fx.xpi ├── blok-1.0.1.xpi ├── blok-1.0.xpi ├── blok-1.0rc1.xpi ├── blok-1.0rc10.xpi ├── blok-1.0rc2.xpi ├── blok-1.0rc3.xpi ├── blok-1.0rc7.xpi ├── blok-1.0rc8.xpi ├── blok-1.0rc9.xpi └── blok-1.1.xpi /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | *.bundle.js 3 | web-ext-artifacts/*.zip 4 | .nyc_output 5 | .DS_Store 6 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - "6" 4 | 5 | branches: 6 | only: 7 | - "master" 8 | 9 | before_install: 10 | - rm -f ./web-ext-artifacts/*.zip 11 | 12 | script: 13 | - npm run build 14 | 15 | after_success: 16 | - npm run coveralls 17 | -------------------------------------------------------------------------------- /.web-extension-id: -------------------------------------------------------------------------------- 1 | # This file was created by https://github.com/mozilla/web-ext 2 | # Your auto-generated extension ID for addons.mozilla.org is: 3 | blok@mozilla.org -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Mozilla Public License Version 2.0 2 | ================================== 3 | 4 | 1. Definitions 5 | -------------- 6 | 7 | 1.1. "Contributor" 8 | means each individual or legal entity that creates, contributes to 9 | the creation of, or owns Covered Software. 10 | 11 | 1.2. "Contributor Version" 12 | means the combination of the Contributions of others (if any) used 13 | by a Contributor and that particular Contributor's Contribution. 14 | 15 | 1.3. "Contribution" 16 | means Covered Software of a particular Contributor. 17 | 18 | 1.4. "Covered Software" 19 | means Source Code Form to which the initial Contributor has attached 20 | the notice in Exhibit A, the Executable Form of such Source Code 21 | Form, and Modifications of such Source Code Form, in each case 22 | including portions thereof. 23 | 24 | 1.5. "Incompatible With Secondary Licenses" 25 | means 26 | 27 | (a) that the initial Contributor has attached the notice described 28 | in Exhibit B to the Covered Software; or 29 | 30 | (b) that the Covered Software was made available under the terms of 31 | version 1.1 or earlier of the License, but not also under the 32 | terms of a Secondary License. 33 | 34 | 1.6. "Executable Form" 35 | means any form of the work other than Source Code Form. 36 | 37 | 1.7. "Larger Work" 38 | means a work that combines Covered Software with other material, in 39 | a separate file or files, that is not Covered Software. 40 | 41 | 1.8. "License" 42 | means this document. 43 | 44 | 1.9. "Licensable" 45 | means having the right to grant, to the maximum extent possible, 46 | whether at the time of the initial grant or subsequently, any and 47 | all of the rights conveyed by this License. 48 | 49 | 1.10. "Modifications" 50 | means any of the following: 51 | 52 | (a) any file in Source Code Form that results from an addition to, 53 | deletion from, or modification of the contents of Covered 54 | Software; or 55 | 56 | (b) any new file in Source Code Form that contains any Covered 57 | Software. 58 | 59 | 1.11. "Patent Claims" of a Contributor 60 | means any patent claim(s), including without limitation, method, 61 | process, and apparatus claims, in any patent Licensable by such 62 | Contributor that would be infringed, but for the grant of the 63 | License, by the making, using, selling, offering for sale, having 64 | made, import, or transfer of either its Contributions or its 65 | Contributor Version. 66 | 67 | 1.12. "Secondary License" 68 | means either the GNU General Public License, Version 2.0, the GNU 69 | Lesser General Public License, Version 2.1, the GNU Affero General 70 | Public License, Version 3.0, or any later versions of those 71 | licenses. 72 | 73 | 1.13. "Source Code Form" 74 | means the form of the work preferred for making modifications. 75 | 76 | 1.14. "You" (or "Your") 77 | means an individual or a legal entity exercising rights under this 78 | License. For legal entities, "You" includes any entity that 79 | controls, is controlled by, or is under common control with You. For 80 | purposes of this definition, "control" means (a) the power, direct 81 | or indirect, to cause the direction or management of such entity, 82 | whether by contract or otherwise, or (b) ownership of more than 83 | fifty percent (50%) of the outstanding shares or beneficial 84 | ownership of such entity. 85 | 86 | 2. License Grants and Conditions 87 | -------------------------------- 88 | 89 | 2.1. Grants 90 | 91 | Each Contributor hereby grants You a world-wide, royalty-free, 92 | non-exclusive license: 93 | 94 | (a) under intellectual property rights (other than patent or trademark) 95 | Licensable by such Contributor to use, reproduce, make available, 96 | modify, display, perform, distribute, and otherwise exploit its 97 | Contributions, either on an unmodified basis, with Modifications, or 98 | as part of a Larger Work; and 99 | 100 | (b) under Patent Claims of such Contributor to make, use, sell, offer 101 | for sale, have made, import, and otherwise transfer either its 102 | Contributions or its Contributor Version. 103 | 104 | 2.2. Effective Date 105 | 106 | The licenses granted in Section 2.1 with respect to any Contribution 107 | become effective for each Contribution on the date the Contributor first 108 | distributes such Contribution. 109 | 110 | 2.3. Limitations on Grant Scope 111 | 112 | The licenses granted in this Section 2 are the only rights granted under 113 | this License. No additional rights or licenses will be implied from the 114 | distribution or licensing of Covered Software under this License. 115 | Notwithstanding Section 2.1(b) above, no patent license is granted by a 116 | Contributor: 117 | 118 | (a) for any code that a Contributor has removed from Covered Software; 119 | or 120 | 121 | (b) for infringements caused by: (i) Your and any other third party's 122 | modifications of Covered Software, or (ii) the combination of its 123 | Contributions with other software (except as part of its Contributor 124 | Version); or 125 | 126 | (c) under Patent Claims infringed by Covered Software in the absence of 127 | its Contributions. 128 | 129 | This License does not grant any rights in the trademarks, service marks, 130 | or logos of any Contributor (except as may be necessary to comply with 131 | the notice requirements in Section 3.4). 132 | 133 | 2.4. Subsequent Licenses 134 | 135 | No Contributor makes additional grants as a result of Your choice to 136 | distribute the Covered Software under a subsequent version of this 137 | License (see Section 10.2) or under the terms of a Secondary License (if 138 | permitted under the terms of Section 3.3). 139 | 140 | 2.5. Representation 141 | 142 | Each Contributor represents that the Contributor believes its 143 | Contributions are its original creation(s) or it has sufficient rights 144 | to grant the rights to its Contributions conveyed by this License. 145 | 146 | 2.6. Fair Use 147 | 148 | This License is not intended to limit any rights You have under 149 | applicable copyright doctrines of fair use, fair dealing, or other 150 | equivalents. 151 | 152 | 2.7. Conditions 153 | 154 | Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted 155 | in Section 2.1. 156 | 157 | 3. Responsibilities 158 | ------------------- 159 | 160 | 3.1. Distribution of Source Form 161 | 162 | All distribution of Covered Software in Source Code Form, including any 163 | Modifications that You create or to which You contribute, must be under 164 | the terms of this License. You must inform recipients that the Source 165 | Code Form of the Covered Software is governed by the terms of this 166 | License, and how they can obtain a copy of this License. You may not 167 | attempt to alter or restrict the recipients' rights in the Source Code 168 | Form. 169 | 170 | 3.2. Distribution of Executable Form 171 | 172 | If You distribute Covered Software in Executable Form then: 173 | 174 | (a) such Covered Software must also be made available in Source Code 175 | Form, as described in Section 3.1, and You must inform recipients of 176 | the Executable Form how they can obtain a copy of such Source Code 177 | Form by reasonable means in a timely manner, at a charge no more 178 | than the cost of distribution to the recipient; and 179 | 180 | (b) You may distribute such Executable Form under the terms of this 181 | License, or sublicense it under different terms, provided that the 182 | license for the Executable Form does not attempt to limit or alter 183 | the recipients' rights in the Source Code Form under this License. 184 | 185 | 3.3. Distribution of a Larger Work 186 | 187 | You may create and distribute a Larger Work under terms of Your choice, 188 | provided that You also comply with the requirements of this License for 189 | the Covered Software. If the Larger Work is a combination of Covered 190 | Software with a work governed by one or more Secondary Licenses, and the 191 | Covered Software is not Incompatible With Secondary Licenses, this 192 | License permits You to additionally distribute such Covered Software 193 | under the terms of such Secondary License(s), so that the recipient of 194 | the Larger Work may, at their option, further distribute the Covered 195 | Software under the terms of either this License or such Secondary 196 | License(s). 197 | 198 | 3.4. Notices 199 | 200 | You may not remove or alter the substance of any license notices 201 | (including copyright notices, patent notices, disclaimers of warranty, 202 | or limitations of liability) contained within the Source Code Form of 203 | the Covered Software, except that You may alter any license notices to 204 | the extent required to remedy known factual inaccuracies. 205 | 206 | 3.5. Application of Additional Terms 207 | 208 | You may choose to offer, and to charge a fee for, warranty, support, 209 | indemnity or liability obligations to one or more recipients of Covered 210 | Software. However, You may do so only on Your own behalf, and not on 211 | behalf of any Contributor. You must make it absolutely clear that any 212 | such warranty, support, indemnity, or liability obligation is offered by 213 | You alone, and You hereby agree to indemnify every Contributor for any 214 | liability incurred by such Contributor as a result of warranty, support, 215 | indemnity or liability terms You offer. You may include additional 216 | disclaimers of warranty and limitations of liability specific to any 217 | jurisdiction. 218 | 219 | 4. Inability to Comply Due to Statute or Regulation 220 | --------------------------------------------------- 221 | 222 | If it is impossible for You to comply with any of the terms of this 223 | License with respect to some or all of the Covered Software due to 224 | statute, judicial order, or regulation then You must: (a) comply with 225 | the terms of this License to the maximum extent possible; and (b) 226 | describe the limitations and the code they affect. Such description must 227 | be placed in a text file included with all distributions of the Covered 228 | Software under this License. Except to the extent prohibited by statute 229 | or regulation, such description must be sufficiently detailed for a 230 | recipient of ordinary skill to be able to understand it. 231 | 232 | 5. Termination 233 | -------------- 234 | 235 | 5.1. The rights granted under this License will terminate automatically 236 | if You fail to comply with any of its terms. However, if You become 237 | compliant, then the rights granted under this License from a particular 238 | Contributor are reinstated (a) provisionally, unless and until such 239 | Contributor explicitly and finally terminates Your grants, and (b) on an 240 | ongoing basis, if such Contributor fails to notify You of the 241 | non-compliance by some reasonable means prior to 60 days after You have 242 | come back into compliance. Moreover, Your grants from a particular 243 | Contributor are reinstated on an ongoing basis if such Contributor 244 | notifies You of the non-compliance by some reasonable means, this is the 245 | first time You have received notice of non-compliance with this License 246 | from such Contributor, and You become compliant prior to 30 days after 247 | Your receipt of the notice. 248 | 249 | 5.2. If You initiate litigation against any entity by asserting a patent 250 | infringement claim (excluding declaratory judgment actions, 251 | counter-claims, and cross-claims) alleging that a Contributor Version 252 | directly or indirectly infringes any patent, then the rights granted to 253 | You by any and all Contributors for the Covered Software under Section 254 | 2.1 of this License shall terminate. 255 | 256 | 5.3. In the event of termination under Sections 5.1 or 5.2 above, all 257 | end user license agreements (excluding distributors and resellers) which 258 | have been validly granted by You or Your distributors under this License 259 | prior to termination shall survive termination. 260 | 261 | ************************************************************************ 262 | * * 263 | * 6. Disclaimer of Warranty * 264 | * ------------------------- * 265 | * * 266 | * Covered Software is provided under this License on an "as is" * 267 | * basis, without warranty of any kind, either expressed, implied, or * 268 | * statutory, including, without limitation, warranties that the * 269 | * Covered Software is free of defects, merchantable, fit for a * 270 | * particular purpose or non-infringing. The entire risk as to the * 271 | * quality and performance of the Covered Software is with You. * 272 | * Should any Covered Software prove defective in any respect, You * 273 | * (not any Contributor) assume the cost of any necessary servicing, * 274 | * repair, or correction. This disclaimer of warranty constitutes an * 275 | * essential part of this License. No use of any Covered Software is * 276 | * authorized under this License except under this disclaimer. * 277 | * * 278 | ************************************************************************ 279 | 280 | ************************************************************************ 281 | * * 282 | * 7. Limitation of Liability * 283 | * -------------------------- * 284 | * * 285 | * Under no circumstances and under no legal theory, whether tort * 286 | * (including negligence), contract, or otherwise, shall any * 287 | * Contributor, or anyone who distributes Covered Software as * 288 | * permitted above, be liable to You for any direct, indirect, * 289 | * special, incidental, or consequential damages of any character * 290 | * including, without limitation, damages for lost profits, loss of * 291 | * goodwill, work stoppage, computer failure or malfunction, or any * 292 | * and all other commercial damages or losses, even if such party * 293 | * shall have been informed of the possibility of such damages. This * 294 | * limitation of liability shall not apply to liability for death or * 295 | * personal injury resulting from such party's negligence to the * 296 | * extent applicable law prohibits such limitation. Some * 297 | * jurisdictions do not allow the exclusion or limitation of * 298 | * incidental or consequential damages, so this exclusion and * 299 | * limitation may not apply to You. * 300 | * * 301 | ************************************************************************ 302 | 303 | 8. Litigation 304 | ------------- 305 | 306 | Any litigation relating to this License may be brought only in the 307 | courts of a jurisdiction where the defendant maintains its principal 308 | place of business and such litigation shall be governed by laws of that 309 | jurisdiction, without reference to its conflict-of-law provisions. 310 | Nothing in this Section shall prevent a party's ability to bring 311 | cross-claims or counter-claims. 312 | 313 | 9. Miscellaneous 314 | ---------------- 315 | 316 | This License represents the complete agreement concerning the subject 317 | matter hereof. If any provision of this License is held to be 318 | unenforceable, such provision shall be reformed only to the extent 319 | necessary to make it enforceable. Any law or regulation which provides 320 | that the language of a contract shall be construed against the drafter 321 | shall not be used to construe this License against a Contributor. 322 | 323 | 10. Versions of the License 324 | --------------------------- 325 | 326 | 10.1. New Versions 327 | 328 | Mozilla Foundation is the license steward. Except as provided in Section 329 | 10.3, no one other than the license steward has the right to modify or 330 | publish new versions of this License. Each version will be given a 331 | distinguishing version number. 332 | 333 | 10.2. Effect of New Versions 334 | 335 | You may distribute the Covered Software under the terms of the version 336 | of the License under which You originally received the Covered Software, 337 | or under the terms of any subsequent version published by the license 338 | steward. 339 | 340 | 10.3. Modified Versions 341 | 342 | If you create software not governed by this License, and you want to 343 | create a new license for such software, you may create and use a 344 | modified version of this License if you rename the license and remove 345 | any references to the name of the license steward (except to note that 346 | such modified license differs from this License). 347 | 348 | 10.4. Distributing Source Code Form that is Incompatible With Secondary 349 | Licenses 350 | 351 | If You choose to distribute Source Code Form that is Incompatible With 352 | Secondary Licenses under the terms of this version of the License, the 353 | notice described in Exhibit B of this License must be attached. 354 | 355 | Exhibit A - Source Code Form License Notice 356 | ------------------------------------------- 357 | 358 | This Source Code Form is subject to the terms of the Mozilla Public 359 | License, v. 2.0. If a copy of the MPL was not distributed with this 360 | file, You can obtain one at http://mozilla.org/MPL/2.0/. 361 | 362 | If it is not possible or desirable to put the notice in a particular 363 | file, then You may include the notice in a location (such as a LICENSE 364 | file in a relevant directory) where a recipient would be likely to look 365 | for such a notice. 366 | 367 | You may add additional accurate notices of copyright ownership. 368 | 369 | Exhibit B - "Incompatible With Secondary Licenses" Notice 370 | --------------------------------------------------------- 371 | 372 | This Source Code Form is "Incompatible With Secondary Licenses", as 373 | defined by the Mozilla Public License, v. 2.0. 374 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Tracking Protection: Test Pilot Experiment 2 | ## AKA Blok 3 | 4 | [![Build Status](https://travis-ci.org/mozilla/blok.svg?branch=master)](https://travis-ci.org/mozilla/blok) 5 | [![Coverage 6 | Status](https://coveralls.io/repos/github/mozilla/blok/badge.svg)](https://coveralls.io/github/mozilla/blok) 7 | [![Available on Test Pilot](https://img.shields.io/badge/available_on-Test_Pilot-0996F8.svg)](https://testpilot.firefox.com/experiments/tracking-protection) 8 | 9 | [Web Extension](https://developer.mozilla.org/en-US/Add-ons/WebExtensions/) re-implementation of [Tracking Protection for Firefox](https://support.mozilla.org/en-US/kb/tracking-protection-pbm). 10 | 11 | We will run this add-on thru [Test Pilot experimentation](https://testpilot.firefox.com/experiments) to: 12 | 13 | * Measure web content breakage 14 | * Collect user feedback 15 | 16 | When we have breakage data and user feedback, we will change the tracking protection implementation, so users get better web experience with tracking protection. 17 | 18 | 19 | ## Requirements 20 | 21 | * Firefox 48+ 22 | 23 | 24 | ## Run it 25 | 26 | 1. [Download the latest `.xpi`](https://github.com/mozilla/blok/tree/master/web-ext-artifacts) 27 | 2. In Firefox, "Open File" and select the `.xpi` 28 | 29 | When the add-on blocks tracker requests, you will see a Tracking Protection pageAction icon: 30 | 31 | ![pageAction Screenshot](docs/page-action-screenshot.png) 32 | 33 | When you click the icon, you will see a pop-up, so you can report 34 | broken/working pages, or toggle Tracking Protection on or off: 35 | 36 | ![Pop-up Screenshot](docs/pop-up-screenshot.png) 37 | 38 | 39 | ## Development 40 | 41 | 1. Clone this repo locally 42 | 2. `cd blok` 43 | 3. `npm install` 44 | 4. `npm run bundle` 45 | 46 | ### Running the Code 47 | 48 | This add-on depends on [`web-ext`](https://developer.mozilla.org/en-US/Add-ons/WebExtensions/Getting_started_with_web-ext). Using `web-ext`, start a version of Firefox running the add-on like so: 49 | 50 | `./node_modules/.bin/web-ext run --source-dir=src --firefox-binary {path to Firefox 49+ binary}` 51 | 52 | ### Development Environment 53 | 54 | Add-on development is better with [a particular environment](https://developer.mozilla.org/en-US/Add-ons/Setting_up_extension_development_environment). One simple way to get that environment set up is to install the [DevPrefs add-on](https://addons.mozilla.org/en-US/firefox/addon/devprefs/). You can make a custom Firefox profile that includes the DevPrefs add-on, and use that profile when you run the code in this repository. 55 | 56 | ![profileEditor Screenshot](docs/profile-editor-screenshot.png) 57 | 58 | 1. Make a new profile by running `{path to Firefox binary} -no-remote -P {new_profile_name}`, which launches the profile editor. "Create Profile" -- name it whatever you wish (e.g. 'blok_dev') and store it in the default location. It's probably best to deselect the option to "Use without asking," since you probably don't want to use this as your default profile. 59 | 60 | 2. Once you've created your profile, click "Start Firefox". A new instance of Firefox should launch. Go to Tools->Add-ons and search for "DevPrefs". Install it. Quit Firefox. 61 | 62 | 3. Now you have a new, vanilla Firefox profile with the DevPrefs add-on installed. You can use your new profile with the code in _this_ repository like so: 63 | 64 | `./node_modules/.bin/web-ext run --source-dir=src --firefox-binary {path to Firefox 49+ binary} --firefox-profile {new_profile_name}` 65 | 66 | Check out the [Browser Toolbox](https://developer.mozilla.org/en-US/docs/Tools/Browser_Toolbox) for more information about debugging add-on code. 67 | 68 | ## Testing 69 | 70 | Requires node 6+ 71 | 72 | `npm test` 73 | 74 | ## Distributing 75 | 76 | To distribute, you will need AMO access credentials. See the `web-ext` docs. 77 | 78 | 1. Use [`web-ext 79 | sign`](https://developer.mozilla.org/en-US/Add-ons/WebExtensions/web-ext_command_reference#web-ext_sign) 80 | 81 | ## FAQ, Footnotes, Appendices, etc. 82 | #### How does this compare with ublock, privacy badger, ghostery, etc. 83 | The primary goal of this add-on experiment is to create a feedback loop for 84 | tracking protection users to provide data on problems & breakage, so we 85 | (Mozilla) can learn how to improve tracking protection technologies in ways 86 | that maximize user privacy AND minimize web breakage. 87 | 88 | The other privacy add-ons are great tools as well. The focus on reporting 89 | website problems & breakages is the key difference here. In fact, we deferred a 90 | number of other features in favor of simplicity and to make the feedback 91 | mechanism the primary focus of the add-on. 92 | 93 | Read more on [the discourse forum](https://discourse.mozilla-community.org/c/test-pilot/tracking-protection). 94 | 95 | ### How do I run the add-on without `web-ext` 96 | 97 | 1. Go to `about:config` and set `xpinstall.signatures.required` to `false` 98 | 2. Go to `about:debugging` 99 | 3. Click "Load Temporary Add-on" 100 | 4. Select this repo's `src/manifest.json` file 101 | -------------------------------------------------------------------------------- /docs/kpi-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla/blok/faac2281c48cd226b4fb8c4e22de588a02328c31/docs/kpi-1.png -------------------------------------------------------------------------------- /docs/metrics.md: -------------------------------------------------------------------------------- 1 | # METRICS 2 | 3 | ## Data Analysis 4 | The collected data will primarily be used to answer the following questions. 5 | Images are used for visualization and are not composed of actual data. 6 | 7 | ### Do people use this? 8 | 9 | What is the overall engagement of Blok? **This is the standard Daily Active User 10 | (DAU) and Monthly Active User (MAU) analysis.** This captures data from the 11 | people who have the add-on installed, regardless of whether they are actively 12 | interacting with it. 13 | 14 | ![](images/kpi-1.png) 15 | 16 | ### Immediate Questions 17 | 18 | * On what sites are users reporting the most breakage? 19 | * How are those sites broken? 20 | * Which trackers are most commonly involved with breakage? 21 | 22 | ### Follow-up Questions 23 | 24 | * How might we fix sites that are reported as broken? 25 | * Is there an anti-blocker on broken sites? 26 | * What tracking techniques are the most common trackers using? 27 | * How much time & bandwidth are users wasting with trackers? 28 | * How often are users prompted about blocking and don't reply? 29 | 30 | ## Data Collection 31 | 32 | ### Server Side 33 | There is currently no server side component to Blok. 34 | 35 | ### Client Side 36 | Blok will use Test Pilot's Telemetry wrapper with no batching of data. Details 37 | of when pings are sent are below, along with examples of the `payload` portion 38 | of a `testpilottest` telemetry ping for each scenario. 39 | 40 | * The user clicks the "Toggle to disable" switch in the popup 41 | 42 | ```js 43 | { 44 | "originDomain": "www.reddit.com", 45 | "trackerDomains": ["ssl.google-analytics.com", 46 | "z.moatads.com"], 47 | "breakage": "", 48 | "notes": "", 49 | "event": "blok-disabled" 50 | } 51 | ``` 52 | 53 | * The user clicks "Toggle to enable" switch in the popup 54 | 55 | ```js 56 | { 57 | "originDomain": "www.reddit.com", 58 | "trackerDomains": ["ssl.google-analytics.com", 59 | "z.moatads.com"], 60 | "breakage": "", 61 | "notes": "", 62 | "event": "blok-enabled" 63 | } 64 | ``` 65 | 66 | * The user clicks "This page works well" button in the popup 67 | 68 | ```js 69 | { 70 | "originDomain": "www.redditmedia.com", 71 | "trackerDomains": ["ssl.google-analytics.com", 72 | "z.moatads.com"], 73 | "breakage": "", 74 | "notes": "", 75 | "event": "page-works" 76 | } 77 | ``` 78 | 79 | * The user clicks "Report a problem" button in the popup 80 | 81 | ```js 82 | { 83 | "originDomain": "www.redditmedia.com", 84 | "trackerDomains": ["ssl.google-analytics.com", 85 | "z.moatads.com"], 86 | "breakage": "", 87 | "notes": "", 88 | "event": "page-problem" 89 | } 90 | ``` 91 | 92 | * The user submits the "There are problems with:" form, which appears after they click the "Report a problem" button 93 | 94 | ```js 95 | { 96 | "originDomain": "www.reddit.com", 97 | "trackerDomains": ["ssl.google-analytics.com", 98 | "z.moatads.com"], 99 | "breakage": "layout", // or "images", "video", "buttons", "other" 100 | "notes": "", // will always be blank from this form 101 | "event": "submit" 102 | } 103 | ``` 104 | 105 | * The user submits the "Why do you think Tracking Protection caused this problem?" form, which appears after they submit the "There are problems with:" form 106 | 107 | ```js 108 | { 109 | "originDomain": "www.reddit.com", 110 | "trackerDomains": ["ssl.google-analytics.com", 111 | "z.moatads.com"], 112 | "breakage": "layout", // or "images", "video", "buttons", "other" 113 | "notes": "", // a free form text field from the user 114 | "event": "submit" 115 | } 116 | ``` 117 | 118 | 119 | A Redshift schema for the payload: 120 | 121 | ```lua 122 | local schema = { 123 | -- column name field type length attributes field name 124 | {"originDomain", "VARCHAR", 255, nil, "Fields[payload.originDomain]"}, 125 | {"trackerDomains", "VARCHAR", 1000, nil, "Fields[payload.trackerDomains]"}, 126 | {"breakage", "VARCHAR", 255, nil, "Fields[payload.breakage]"}, 127 | {"notes", "VARCHAR", 10000 nil, "Fields[payload.notes]"}, 128 | {"event", "VARCHAR", 255, nil, "Fields[payload.event]"} 129 | } 130 | ``` 131 | 132 | Valid data should be enforced on the server side: 133 | 134 | * The `breakage` field MUST be either an empty string or one of "layout", 135 | "images", "video", "buttons", "other" 136 | 137 | All Mozilla data is kept by default for 180 days and in accordance with our 138 | privacy policies. 139 | -------------------------------------------------------------------------------- /docs/page-action-screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla/blok/faac2281c48cd226b4fb8c4e22de588a02328c31/docs/page-action-screenshot.png -------------------------------------------------------------------------------- /docs/pop-up-screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla/blok/faac2281c48cd226b4fb8c4e22de588a02328c31/docs/pop-up-screenshot.png -------------------------------------------------------------------------------- /docs/profile-editor-screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla/blok/faac2281c48cd226b4fb8c4e22de588a02328c31/docs/profile-editor-screenshot.png -------------------------------------------------------------------------------- /docs/testplan.md: -------------------------------------------------------------------------------- 1 | [Link to permanent Blok QA test plan](https://wiki.mozilla.org/QA/Blok) -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "tracking-protection-experiment", 3 | "description": "Web Extension implementation of Firefox tracking protection", 4 | "version": "1.0.0", 5 | "author": "Luke Crouch", 6 | "bugs": { 7 | "url": "https://github.com/mozilla/blok/issues" 8 | }, 9 | "dependencies": { 10 | }, 11 | "devDependencies": { 12 | "browserify": "13.0.1", 13 | "coveralls": "2.11.12", 14 | "envify": "3.4.1", 15 | "faucet": "0.0.1", 16 | "npm-watch": "0.1.5", 17 | "nsp": "2.6.1", 18 | "nyc": "7.0.0", 19 | "standard": "7.1.2", 20 | "tape": "4.6.0", 21 | "web-ext": "1.4.0" 22 | }, 23 | "directories": { 24 | "test": "tests" 25 | }, 26 | "homepage": "https://github.com/mozilla/blok#readme", 27 | "keywords": [ 28 | "mozilla", 29 | "firefox", 30 | "tracking protection", 31 | "web extension" 32 | ], 33 | "license": "MPL-2.0", 34 | "main": "index.js", 35 | "nyc": { 36 | "all": true, 37 | "exclude": [ 38 | "**/*.bundle.js" 39 | ] 40 | }, 41 | "repository": { 42 | "type": "git", 43 | "url": "git+https://github.com/mozilla/blok.git" 44 | }, 45 | "scripts": { 46 | "build": "npm test && MODE=production npm run bundle && web-ext build -s src", 47 | "build-dev": "npm test && MODE=dev npm run bundle && web-ext build -s src", 48 | "bundle": "browserify -d -t envify src/js/background.js > src/js/background.bundle.js", 49 | "coverage": "nyc npm test", 50 | "coveralls": "nyc npm test && nyc report --reporter=text-lcov | coveralls", 51 | "firefox": "npm run bundle && web-ext run -s src", 52 | "lint": "standard && web-ext lint --self-hosted -s src", 53 | "postlint": "nsp check -o summary", 54 | "pretest": "npm run lint", 55 | "test": "tape tests/**/*.js | faucet", 56 | "watch": "npm-watch" 57 | }, 58 | "standard": { 59 | "globals": [ 60 | "BroadcastChannel", 61 | "browser", 62 | "fetch", 63 | "URL" 64 | ] 65 | }, 66 | "watch": { 67 | "bundle": { 68 | "patterns": [ 69 | "src/js/*.js" 70 | ], 71 | "ignore": "*bundle.js" 72 | } 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /src/css/foundation.min.css: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | /*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{font-size:2em;margin:.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:not-allowed}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-appearance:textfield;box-sizing:content-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}legend{border:0;padding:0}textarea{overflow:auto}optgroup{font-weight:700}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}.foundation-mq{font-family:"small=0em&medium=40em&large=64em&xlarge=75em&xxlarge=90em"}html{font-size:100%;box-sizing:border-box}*,:after,:before{box-sizing:inherit}body{padding:0;margin:0;font-family:Helvetica Neue,Helvetica,Roboto,Arial,sans-serif;font-weight:400;line-height:1.5;color:#0a0a0a;background:#fefefe;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}img{max-width:100%;height:auto;-ms-interpolation-mode:bicubic;display:inline-block;vertical-align:middle}textarea{height:auto;min-height:50px}select,textarea{border-radius:3px}select{width:100%}#map_canvas embed,#map_canvas img,#map_canvas object,.map_canvas embed,.map_canvas img,.map_canvas object,.mqa-display embed,.mqa-display img,.mqa-display object{max-width:none!important}button{-webkit-appearance:none;-moz-appearance:none;background:transparent;padding:0;border:0;border-radius:3px;line-height:1}[data-whatinput=mouse] button{outline:0}.is-visible{display:block!important}.is-hidden{display:none!important}blockquote,dd,div,dl,dt,form,h1,h2,h3,h4,h5,h6,li,ol,p,pre,td,th,ul{margin:0;padding:0}p{font-size:inherit;line-height:1.6;margin-bottom:1rem;text-rendering:optimizeLegibility}em,i{font-style:italic}b,em,i,strong{line-height:inherit}b,strong{font-weight:700}small{font-size:80%;line-height:inherit}h1,h2,h3,h4,h5,h6{font-family:Helvetica Neue,Helvetica,Roboto,Arial,sans-serif;font-weight:400;font-style:normal;color:inherit;text-rendering:optimizeLegibility;margin-top:0;margin-bottom:.5rem;line-height:1.4}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small{color:#cacaca;line-height:0}h1{font-size:1.5rem}h2{font-size:1.25rem}h3{font-size:1.1875rem}h4{font-size:1.125rem}h5{font-size:1.0625rem}h6{font-size:1rem}@media screen and (min-width:40em){h1{font-size:3rem}h2{font-size:2.5rem}h3{font-size:1.9375rem}h4{font-size:1.5625rem}h5{font-size:1.25rem}h6{font-size:1rem}}a{color:#2ba6cb;text-decoration:none;line-height:inherit;cursor:pointer}a:focus,a:hover{color:#258faf}a img{border:0}hr{max-width:62.5rem;height:0;border-right:0;border-top:0;border-bottom:1px solid #cacaca;border-left:0;margin:1.25rem auto;clear:both}dl,ol,ul{line-height:1.6;margin-bottom:1rem;list-style-position:outside}li{font-size:inherit}ul{list-style-type:disc}ol,ul{margin-left:1.25rem}ol ol,ol ul,ul ol,ul ul{margin-left:1.25rem;margin-bottom:0}dl{margin-bottom:1rem}dl dt{margin-bottom:.3rem;font-weight:700}blockquote{margin:0 0 1rem;padding:.5625rem 1.25rem 0 1.1875rem;border-left:1px solid #cacaca}blockquote,blockquote p{line-height:1.6;color:#8a8a8a}cite{display:block;font-size:.8125rem;color:#8a8a8a}cite:before{content:'\2014 \0020'}abbr{color:#0a0a0a;cursor:help;border-bottom:1px dotted #0a0a0a}code{font-weight:400;border:1px solid #cacaca;padding:.125rem .3125rem .0625rem}code,kbd{font-family:Consolas,Liberation Mono,Courier,monospace;color:#0a0a0a;background-color:#e6e6e6}kbd{padding:.125rem .25rem 0;margin:0;border-radius:3px}.subheader{margin-top:.2rem;margin-bottom:.5rem;font-weight:400;line-height:1.4;color:#8a8a8a}.lead{font-size:125%;line-height:1.6}.stat{font-size:2.5rem;line-height:1}p+.stat{margin-top:-1rem}.no-bullet{margin-left:0;list-style:none}.text-left{text-align:left}.text-right{text-align:right}.text-center{text-align:center}.text-justify{text-align:justify}@media screen and (min-width:40em){.medium-text-left{text-align:left}.medium-text-right{text-align:right}.medium-text-center{text-align:center}.medium-text-justify{text-align:justify}}@media screen and (min-width:64em){.large-text-left{text-align:left}.large-text-right{text-align:right}.large-text-center{text-align:center}.large-text-justify{text-align:justify}}.show-for-print{display:none!important}@media print{*{background:transparent!important;color:#000!important;box-shadow:none!important;text-shadow:none!important}.show-for-print{display:block!important}.hide-for-print{display:none!important}table.show-for-print{display:table!important}thead.show-for-print{display:table-header-group!important}tbody.show-for-print{display:table-row-group!important}tr.show-for-print{display:table-row!important}td.show-for-print,th.show-for-print{display:table-cell!important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}.ir a:after,a[href^='#']:after,a[href^='javascript:']:after{content:''}abbr[title]:after{content:" (" attr(title) ")"}blockquote,pre{border:1px solid #8a8a8a;page-break-inside:avoid}thead{display:table-header-group}img,tr{page-break-inside:avoid}img{max-width:100%!important}@page{margin:.5cm}h2,h3,p{orphans:3;widows:3}h2,h3{page-break-after:avoid}}[type=color],[type=date],[type=datetime-local],[type=datetime],[type=email],[type=month],[type=number],[type=password],[type=search],[type=tel],[type=text],[type=time],[type=url],[type=week],textarea{display:block;box-sizing:border-box;width:100%;height:2.4375rem;padding:.5rem;border:1px solid #cacaca;margin:0 0 1rem;font-family:inherit;font-size:1rem;color:#0a0a0a;background-color:#fefefe;box-shadow:inset 0 1px 2px hsla(0,0%,4%,.1);border-radius:3px;transition:box-shadow .5s,border-color .25s ease-in-out;-webkit-appearance:none;-moz-appearance:none}[type=color]:focus,[type=date]:focus,[type=datetime-local]:focus,[type=datetime]:focus,[type=email]:focus,[type=month]:focus,[type=number]:focus,[type=password]:focus,[type=search]:focus,[type=tel]:focus,[type=text]:focus,[type=time]:focus,[type=url]:focus,[type=week]:focus,textarea:focus{border:1px solid #8a8a8a;background-color:#fefefe;outline:none;box-shadow:0 0 5px #cacaca;transition:box-shadow .5s,border-color .25s ease-in-out}textarea{max-width:100%}textarea[rows]{height:auto}input::-webkit-input-placeholder,textarea::-webkit-input-placeholder{color:#cacaca}input::-moz-placeholder,textarea::-moz-placeholder{color:#cacaca}input:-ms-input-placeholder,textarea:-ms-input-placeholder{color:#cacaca}input::placeholder,textarea::placeholder{color:#cacaca}input:disabled,input[readonly],textarea:disabled,textarea[readonly]{background-color:#e6e6e6;cursor:not-allowed}[type=button],[type=submit]{border-radius:3px;-webkit-appearance:none;-moz-appearance:none}input[type=search]{box-sizing:border-box}[type=checkbox],[type=file],[type=radio]{margin:0 0 1rem}[type=checkbox]+label,[type=radio]+label{display:inline-block;margin-left:.5rem;margin-right:1rem;margin-bottom:0;vertical-align:baseline}[type=checkbox]+label[for],[type=radio]+label[for]{cursor:pointer}label>[type=checkbox],label>[type=radio]{margin-right:.5rem}[type=file]{width:100%}label{display:block;margin:0;font-size:.875rem;font-weight:400;line-height:1.8;color:#0a0a0a}label.middle{margin:0 0 1rem;padding:.5625rem 0}.help-text{margin-top:-.5rem;font-size:.8125rem;font-style:italic;color:#0a0a0a}.input-group{display:-webkit-flex;display:-ms-flexbox;display:flex;width:100%;margin-bottom:1rem;-webkit-align-items:stretch;-ms-flex-align:stretch;align-items:stretch}.input-group>:first-child{border-radius:3px 0 0 3px}.input-group>:last-child>*{border-radius:0 3px 3px 0}.input-group-button,.input-group-field,.input-group-label{margin:0;white-space:nowrap}.input-group-label{text-align:center;padding:0 1rem;background:#e6e6e6;color:#0a0a0a;border:1px solid #cacaca;white-space:nowrap;-webkit-flex:0 0 auto;-ms-flex:0 0 auto;flex:0 0 auto;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-ms-flex-align:center;align-items:center}.input-group-label:first-child{border-right:0}.input-group-label:last-child{border-left:0}.input-group-field{border-radius:0;-webkit-flex:1 1 0px;-ms-flex:1 1 0px;flex:1 1 0px;width:auto;height:auto}.input-group-button{padding-top:0;padding-bottom:0;text-align:center;-webkit-flex:0 0 auto;-ms-flex:0 0 auto;flex:0 0 auto}.input-group-button a,.input-group-button button,.input-group-button input{margin:0}.input-group .input-group-button{display:table-cell}fieldset{border:0;padding:0;margin:0}legend{margin-bottom:.5rem;max-width:100%}.fieldset{border:1px solid #cacaca;padding:1.25rem;margin:1.125rem 0}.fieldset legend{background:#fefefe;padding:0 .1875rem;margin:0;margin-left:-.1875rem}select{height:2.4375rem;padding:.5rem;border:1px solid #cacaca;margin:0 0 1rem;font-size:1rem;font-family:inherit;line-height:normal;color:#0a0a0a;background-color:#fefefe;border-radius:3px;-webkit-appearance:none;-moz-appearance:none;background-image:url("data:image/svg+xml;utf8,");background-size:9px 6px;background-position:right -1rem center;background-origin:content-box;background-repeat:no-repeat;padding-right:1.5rem}@media screen and (min-width:0\0){select{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAYCAYAAACbU/80AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAIpJREFUeNrEkckNgDAMBBfRkEt0ObRBBdsGXUDgmQfK4XhH2m8czQAAy27R3tsw4Qfe2x8uOO6oYLb6GlOor3GF+swURAOmUJ+RwtEJs9WvTGEYxBXqI1MQAZhCfUQKRzDMVj+TwrAIV6jvSUEkYAr1LSkcyTBb/V+KYfX7xAeusq3sLDtGH3kEGACPWIflNZfhRQAAAABJRU5ErkJggg==")}}select:disabled{background-color:#e6e6e6;cursor:not-allowed}select::-ms-expand{display:none}select[multiple]{height:auto;background-image:none}.is-invalid-input:not(:focus){background-color:rgba(198,15,19,.1);border-color:#c60f13}.form-error,.is-invalid-label{color:#c60f13}.form-error{display:none;margin-top:-.5rem;margin-bottom:1rem;font-size:.75rem;font-weight:700}.form-error.is-visible{display:block}.float-left{float:left!important}.float-right{float:right!important}.float-center{display:block;margin-left:auto;margin-right:auto}.clearfix:after,.clearfix:before{content:' ';display:table;-webkit-flex-basis:0;-ms-flex-preferred-size:0;flex-basis:0;-webkit-order:1;-ms-flex-order:1;order:1}.clearfix:after{clear:both}.hide{display:none!important}.invisible{visibility:hidden}@media screen and (max-width:39.9375em){.hide-for-small-only{display:none!important}}@media screen and (max-width:0em),screen and (min-width:40em){.show-for-small-only{display:none!important}}@media screen and (min-width:40em){.hide-for-medium{display:none!important}}@media screen and (max-width:39.9375em){.show-for-medium{display:none!important}}@media screen and (min-width:40em) and (max-width:63.9375em){.hide-for-medium-only{display:none!important}}@media screen and (max-width:39.9375em),screen and (min-width:64em){.show-for-medium-only{display:none!important}}@media screen and (min-width:64em){.hide-for-large{display:none!important}}@media screen and (max-width:63.9375em){.show-for-large{display:none!important}}@media screen and (min-width:64em) and (max-width:74.9375em){.hide-for-large-only{display:none!important}}@media screen and (max-width:63.9375em),screen and (min-width:75em){.show-for-large-only{display:none!important}}.show-for-sr,.show-on-focus{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}.show-on-focus:active,.show-on-focus:focus{position:static!important;height:auto;width:auto;overflow:visible;clip:auto}.hide-for-portrait,.show-for-landscape{display:block!important}@media screen and (orientation:landscape){.hide-for-portrait,.show-for-landscape{display:block!important}}@media screen and (orientation:portrait){.hide-for-portrait,.show-for-landscape{display:none!important}}.hide-for-landscape,.show-for-portrait{display:none!important}@media screen and (orientation:landscape){.hide-for-landscape,.show-for-portrait{display:none!important}}@media screen and (orientation:portrait){.hide-for-landscape,.show-for-portrait{display:block!important}}.button{display:inline-block;text-align:center;line-height:1;cursor:pointer;-webkit-appearance:none;transition:background-color .25s ease-out,color .25s ease-out;vertical-align:middle;border:1px solid transparent;border-radius:3px;padding:.85em 1em;margin:0 0 1rem;font-size:.9rem;background-color:#2ba6cb;color:#fefefe}[data-whatinput=mouse] .button{outline:0}.button:focus,.button:hover{background-color:#258dad;color:#fefefe}.button.tiny{font-size:.6rem}.button.small{font-size:.75rem}.button.large{font-size:1.25rem}.button.expanded{display:block;width:100%;margin-left:0;margin-right:0}.button.primary{background-color:#2ba6cb;color:#fefefe}.button.primary:focus,.button.primary:hover{background-color:#2285a2;color:#fefefe}.button.secondary{background-color:#e9e9e9;color:#0a0a0a}.button.secondary:focus,.button.secondary:hover{background-color:#bababa;color:#0a0a0a}.button.alert{background-color:#c60f13;color:#fefefe}.button.alert:focus,.button.alert:hover{background-color:#9e0c0f;color:#fefefe}.button.success{background-color:#5da423;color:#fefefe}.button.success:focus,.button.success:hover{background-color:#4a831c;color:#fefefe}.button.warning{background-color:#ffae00;color:#fefefe}.button.warning:focus,.button.warning:hover{background-color:#cc8b00;color:#fefefe}.button.body-font{background-color:#222;color:#fefefe}.button.body-font:focus,.button.body-font:hover{background-color:#1b1b1b;color:#fefefe}.button.header{background-color:#222;color:#fefefe}.button.header:focus,.button.header:hover{background-color:#1b1b1b;color:#fefefe}.button.hollow{border:1px solid #2ba6cb;color:#2ba6cb}.button.hollow,.button.hollow:focus,.button.hollow:hover{background-color:transparent}.button.hollow:focus,.button.hollow:hover{border-color:#165366;color:#165366}.button.hollow.primary{border:1px solid #2ba6cb;color:#2ba6cb}.button.hollow.primary:focus,.button.hollow.primary:hover{border-color:#165366;color:#165366}.button.hollow.secondary{border:1px solid #e9e9e9;color:#e9e9e9}.button.hollow.secondary:focus,.button.hollow.secondary:hover{border-color:#757575;color:#757575}.button.hollow.alert{border:1px solid #c60f13;color:#c60f13}.button.hollow.alert:focus,.button.hollow.alert:hover{border-color:#63080a;color:#63080a}.button.hollow.success{border:1px solid #5da423;color:#5da423}.button.hollow.success:focus,.button.hollow.success:hover{border-color:#2f5212;color:#2f5212}.button.hollow.warning{border:1px solid #ffae00;color:#ffae00}.button.hollow.warning:focus,.button.hollow.warning:hover{border-color:#805700;color:#805700}.button.hollow.body-font{border:1px solid #222;color:#222}.button.hollow.body-font:focus,.button.hollow.body-font:hover{border-color:#111;color:#111}.button.hollow.header{border:1px solid #222;color:#222}.button.hollow.header:focus,.button.hollow.header:hover{border-color:#111;color:#111}.button.disabled,.button[disabled]{opacity:.25;cursor:not-allowed}.button.disabled:focus,.button.disabled:hover,.button[disabled]:focus,.button[disabled]:hover{background-color:#2ba6cb;color:#fefefe}.button.dropdown:after{content:'';display:block;width:0;height:0;border:.4em inset;border-color:#fefefe transparent transparent;border-top-style:solid;border-bottom-width:0;position:relative;top:.4em;float:right;margin-left:1em;display:inline-block}.button.arrow-only:after{margin-left:0;float:none;top:-.1em}.close-button{position:absolute;color:#8a8a8a;right:1rem;top:.5rem;font-size:2em;line-height:1;cursor:pointer}[data-whatinput=mouse] .close-button{outline:0}.close-button:focus,.close-button:hover{color:#0a0a0a}.button-group{margin-bottom:1rem;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-wrap:nowrap;-ms-flex-wrap:nowrap;flex-wrap:nowrap;-webkit-align-items:stretch;-ms-flex-align:stretch;align-items:stretch}.button-group:after,.button-group:before{content:' ';display:table;-webkit-flex-basis:0;-ms-flex-preferred-size:0;flex-basis:0;-webkit-order:1;-ms-flex-order:1;order:1}.button-group:after{clear:both}.button-group .button{margin:0;margin-right:1px;margin-bottom:1px;font-size:.9rem;-webkit-flex:0 0 auto;-ms-flex:0 0 auto;flex:0 0 auto}.button-group .button:last-child{margin-right:0}.button-group.tiny .button{font-size:.6rem}.button-group.small .button{font-size:.75rem}.button-group.large .button{font-size:1.25rem}.button-group.expanded .button{-webkit-flex:1 1 0px;-ms-flex:1 1 0px;flex:1 1 0px}.button-group.primary .button{background-color:#2ba6cb;color:#fefefe}.button-group.primary .button:focus,.button-group.primary .button:hover{background-color:#2285a2;color:#fefefe}.button-group.secondary .button{background-color:#e9e9e9;color:#0a0a0a}.button-group.secondary .button:focus,.button-group.secondary .button:hover{background-color:#bababa;color:#0a0a0a}.button-group.alert .button{background-color:#c60f13;color:#fefefe}.button-group.alert .button:focus,.button-group.alert .button:hover{background-color:#9e0c0f;color:#fefefe}.button-group.success .button{background-color:#5da423;color:#fefefe}.button-group.success .button:focus,.button-group.success .button:hover{background-color:#4a831c;color:#fefefe}.button-group.warning .button{background-color:#ffae00;color:#fefefe}.button-group.warning .button:focus,.button-group.warning .button:hover{background-color:#cc8b00;color:#fefefe}.button-group.body-font .button{background-color:#222;color:#fefefe}.button-group.body-font .button:focus,.button-group.body-font .button:hover{background-color:#1b1b1b;color:#fefefe}.button-group.header .button{background-color:#222;color:#fefefe}.button-group.header .button:focus,.button-group.header .button:hover{background-color:#1b1b1b;color:#fefefe}.button-group.stacked,.button-group.stacked-for-medium,.button-group.stacked-for-small{-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap}.button-group.stacked-for-medium .button,.button-group.stacked-for-small .button,.button-group.stacked .button{-webkit-flex:0 0 100%;-ms-flex:0 0 100%;flex:0 0 100%}.button-group.stacked-for-medium .button:last-child,.button-group.stacked-for-small .button:last-child,.button-group.stacked .button:last-child{margin-bottom:0}@media screen and (min-width:40em){.button-group.stacked-for-small .button{-webkit-flex:1 1 0px;-ms-flex:1 1 0px;flex:1 1 0px;margin-bottom:0}}@media screen and (min-width:64em){.button-group.stacked-for-medium .button{-webkit-flex:1 1 0px;-ms-flex:1 1 0px;flex:1 1 0px;margin-bottom:0}}@media screen and (max-width:39.9375em){.button-group.stacked-for-small.expanded{display:block}.button-group.stacked-for-small.expanded .button{display:block;margin-right:0}}.slider{position:relative;height:.5rem;margin-top:1.25rem;margin-bottom:2.25rem;background-color:#e6e6e6;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-ms-touch-action:none;touch-action:none}.slider-fill{position:absolute;top:0;left:0;display:inline-block;max-width:100%;height:.5rem;background-color:#cacaca;transition:all .2s ease-in-out}.slider-fill.is-dragging{transition:all 0s linear}.slider-handle{top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);position:absolute;left:0;z-index:1;display:inline-block;width:1.4rem;height:1.4rem;background-color:#2ba6cb;transition:all .2s ease-in-out;-ms-touch-action:manipulation;touch-action:manipulation;border-radius:3px}[data-whatinput=mouse] .slider-handle{outline:0}.slider-handle:hover{background-color:#258dad}.slider-handle.is-dragging{transition:all 0s linear}.slider.disabled,.slider[disabled]{opacity:.25;cursor:not-allowed}.slider.vertical{display:inline-block;width:.5rem;height:12.5rem;margin:0 1.25rem;-webkit-transform:scaleY(-1);transform:scaleY(-1)}.slider.vertical .slider-fill{top:0;width:.5rem;max-height:100%}.slider.vertical .slider-handle{position:absolute;top:0;left:50%;width:1.4rem;height:1.4rem;-webkit-transform:translateX(-50%);transform:translateX(-50%)}.switch{margin-bottom:1rem;outline:0;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;color:#fefefe;font-weight:700;font-size:.875rem}.switch-input{opacity:0;position:absolute}.switch-paddle{background:#cacaca;cursor:pointer;display:block;position:relative;width:4rem;height:2rem;transition:all .25s ease-out;border-radius:3px;color:inherit;font-weight:inherit}input+.switch-paddle{margin:0}.switch-paddle:after{background:#fefefe;content:'';display:block;position:absolute;height:1.5rem;left:.25rem;top:.25rem;width:1.5rem;transition:all .25s ease-out;-webkit-transform:translateZ(0);transform:translateZ(0);border-radius:3px}input:checked~.switch-paddle{background:#2ba6cb}input:checked~.switch-paddle:after{left:2.25rem}[data-whatinput=mouse] input:focus~.switch-paddle{outline:0}.switch-active,.switch-inactive{position:absolute;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.switch-active{left:8%;display:none}input:checked+label>.switch-active{display:block}.switch-inactive{right:15%}input:checked+label>.switch-inactive{display:none}.switch.tiny .switch-paddle{width:3rem;height:1.5rem;font-size:.625rem}.switch.tiny .switch-paddle:after{width:1rem;height:1rem}.switch.tiny input:checked~.switch-paddle:after{left:1.75rem}.switch.small .switch-paddle{width:3.5rem;height:1.75rem;font-size:.75rem}.switch.small .switch-paddle:after{width:1.25rem;height:1.25rem}.switch.small input:checked~.switch-paddle:after{left:2rem}.switch.large .switch-paddle{width:5rem;height:2.5rem;font-size:1rem}.switch.large .switch-paddle:after{width:2rem;height:2rem}.switch.large input:checked~.switch-paddle:after{left:2.75rem}.menu{margin:0;list-style-type:none;width:100%;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-flex-wrap:nowrap;-ms-flex-wrap:nowrap;flex-wrap:nowrap}[data-whatinput=mouse] .menu>li{outline:0}.menu>li>a{display:block;padding:.7rem 1rem;line-height:1}.menu a,.menu button,.menu input{margin-bottom:0}.menu>li>a{display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-flow:row nowrap;-ms-flex-flow:row nowrap;flex-flow:row}.menu>li>a i,.menu>li>a img,.menu>li>a svg{margin-right:.25rem}.menu>li{-webkit-flex:0 0 auto;-ms-flex:0 0 auto;flex:0 0 auto}.menu.vertical{-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap}.menu.vertical>li{-webkit-flex:0 0 100%;-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}.menu.vertical>li>a{-webkit-align-items:flex-start;-ms-flex-align:start;align-items:flex-start;-webkit-justify-content:flex-start;-ms-flex-pack:start;justify-content:flex-start}@media screen and (min-width:40em){.menu.medium-horizontal{-webkit-flex-wrap:nowrap;-ms-flex-wrap:nowrap;flex-wrap:nowrap}.menu.medium-horizontal>li{-webkit-flex:0 0 auto;-ms-flex:0 0 auto;flex:0 0 auto}.menu.medium-vertical{-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap}.menu.medium-vertical>li{-webkit-flex:0 0 100%;-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}.menu.medium-vertical>li>a{-webkit-align-items:flex-start;-ms-flex-align:start;align-items:flex-start;-webkit-justify-content:flex-start;-ms-flex-pack:start;justify-content:flex-start}}@media screen and (min-width:64em){.menu.large-horizontal{-webkit-flex-wrap:nowrap;-ms-flex-wrap:nowrap;flex-wrap:nowrap}.menu.large-horizontal>li{-webkit-flex:0 0 auto;-ms-flex:0 0 auto;flex:0 0 auto}.menu.large-vertical{-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap}.menu.large-vertical>li{-webkit-flex:0 0 100%;-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}.menu.large-vertical>li>a{-webkit-align-items:flex-start;-ms-flex-align:start;align-items:flex-start;-webkit-justify-content:flex-start;-ms-flex-pack:start;justify-content:flex-start}}.menu.simple li{line-height:1;display:inline-block;margin-right:1rem}.menu.simple a{padding:0}.menu.align-right{-webkit-justify-content:flex-end;-ms-flex-pack:end;justify-content:flex-end}.menu.expanded>li{-webkit-flex:1 1 0px;-ms-flex:1 1 0px;flex:1 1 0px}.menu.expanded>li:first-child:last-child{width:100%}.menu.icon-top>li>a{-webkit-flex-flow:column nowrap;-ms-flex-flow:column nowrap;flex-flow:column}.menu.icon-top>li>a i,.menu.icon-top>li>a img,.menu.icon-top>li>a svg{-webkit-align-self:stretch;-ms-flex-item-align:stretch;align-self:stretch;text-align:center;margin-bottom:.25rem}.menu.nested{margin-left:1rem}.menu .active>a{color:#fefefe;background:#2ba6cb}.menu-text{font-weight:700;color:inherit;line-height:1;padding-top:0;padding-bottom:0;padding:.7rem 1rem}.menu-centered{text-align:center}.menu-centered>.menu{display:inline-block}.no-js [data-responsive-menu] ul{display:none}.is-drilldown{position:relative;overflow:hidden}.is-drilldown li{display:block!important}.is-drilldown-submenu{position:absolute;top:0;left:100%;z-index:-1;height:100%;width:100%;background:#fefefe;transition:-webkit-transform .15s linear;transition:transform .15s linear}.is-drilldown-submenu.is-active{z-index:1;display:block;-webkit-transform:translateX(-100%);transform:translateX(-100%)}.is-drilldown-submenu.is-closing{-webkit-transform:translateX(100%);transform:translateX(100%)}.is-drilldown-submenu-parent>a{position:relative}.is-drilldown-submenu-parent>a:after{content:'';display:block;width:0;height:0;border:6px inset;border-color:transparent transparent transparent #2ba6cb;border-left-style:solid;border-right-width:0;position:absolute;top:50%;margin-top:-6px;right:1rem}.js-drilldown-back>a:before{content:'';display:block;width:0;height:0;border:6px inset;border-color:transparent #2ba6cb transparent transparent;border-right-style:solid;border-left-width:0;display:inline-block;vertical-align:middle;margin-right:.75rem}.is-accordion-submenu-parent>a{position:relative}.is-accordion-submenu-parent>a:after{content:'';display:block;width:0;height:0;border:6px inset;border-color:#2ba6cb transparent transparent;border-top-style:solid;border-bottom-width:0;position:absolute;top:50%;margin-top:-4px;right:1rem}.is-accordion-submenu-parent[aria-expanded=true]>a:after{-webkit-transform-origin:50% 50%;transform-origin:50% 50%;-webkit-transform:scaleY(-1);transform:scaleY(-1)}.dropdown.menu>li.opens-left>.is-dropdown-submenu{left:auto;right:0;top:100%}.dropdown.menu>li.opens-right>.is-dropdown-submenu{right:auto;left:0;top:100%}.dropdown.menu>li.is-dropdown-submenu-parent>a{padding-right:1.5rem;position:relative}.dropdown.menu>li.is-dropdown-submenu-parent>a:after{content:'';display:block;width:0;height:0;border:5px inset;border-color:#2ba6cb transparent transparent;border-top-style:solid;border-bottom-width:0;right:5px;margin-top:-2px}[data-whatinput=mouse] .dropdown.menu a{outline:0}.no-js .dropdown.menu ul{display:none}.dropdown.menu.vertical>li .is-dropdown-submenu{top:0}.dropdown.menu.vertical>li.opens-left>.is-dropdown-submenu{left:auto;right:100%}.dropdown.menu.vertical>li.opens-right>.is-dropdown-submenu{right:auto;left:100%}.dropdown.menu.vertical>li>a:after{right:14px;margin-top:-3px}.dropdown.menu.vertical>li.opens-left>a:after{content:'';display:block;width:0;height:0;border:5px inset;border-color:transparent #2ba6cb transparent transparent;border-right-style:solid;border-left-width:0}.dropdown.menu.vertical>li.opens-right>a:after{content:'';display:block;width:0;height:0;border:5px inset;border-color:transparent transparent transparent #2ba6cb;border-left-style:solid;border-right-width:0}@media screen and (min-width:40em){.dropdown.menu.medium-horizontal>li.opens-left>.is-dropdown-submenu{left:auto;right:0;top:100%}.dropdown.menu.medium-horizontal>li.opens-right>.is-dropdown-submenu{right:auto;left:0;top:100%}.dropdown.menu.medium-horizontal>li.is-dropdown-submenu-parent>a{padding-right:1.5rem;position:relative}.dropdown.menu.medium-horizontal>li.is-dropdown-submenu-parent>a:after{content:'';display:block;width:0;height:0;border:5px inset;border-color:#2ba6cb transparent transparent;border-top-style:solid;border-bottom-width:0;right:5px;margin-top:-2px}.dropdown.menu.medium-vertical>li .is-dropdown-submenu{top:0}.dropdown.menu.medium-vertical>li.opens-left>.is-dropdown-submenu{left:auto;right:100%}.dropdown.menu.medium-vertical>li.opens-right>.is-dropdown-submenu{right:auto;left:100%}.dropdown.menu.medium-vertical>li>a:after{right:14px;margin-top:-3px}.dropdown.menu.medium-vertical>li.opens-left>a:after{content:'';display:block;width:0;height:0;border:5px inset;border-color:transparent #2ba6cb transparent transparent;border-right-style:solid;border-left-width:0}.dropdown.menu.medium-vertical>li.opens-right>a:after{content:'';display:block;width:0;height:0;border:5px inset;border-color:transparent transparent transparent #2ba6cb;border-left-style:solid;border-right-width:0}}@media screen and (min-width:64em){.dropdown.menu.large-horizontal>li.opens-left>.is-dropdown-submenu{left:auto;right:0;top:100%}.dropdown.menu.large-horizontal>li.opens-right>.is-dropdown-submenu{right:auto;left:0;top:100%}.dropdown.menu.large-horizontal>li.is-dropdown-submenu-parent>a{padding-right:1.5rem;position:relative}.dropdown.menu.large-horizontal>li.is-dropdown-submenu-parent>a:after{content:'';display:block;width:0;height:0;border:5px inset;border-color:#2ba6cb transparent transparent;border-top-style:solid;border-bottom-width:0;right:5px;margin-top:-2px}.dropdown.menu.large-vertical>li .is-dropdown-submenu{top:0}.dropdown.menu.large-vertical>li.opens-left>.is-dropdown-submenu{left:auto;right:100%}.dropdown.menu.large-vertical>li.opens-right>.is-dropdown-submenu{right:auto;left:100%}.dropdown.menu.large-vertical>li>a:after{right:14px;margin-top:-3px}.dropdown.menu.large-vertical>li.opens-left>a:after{content:'';display:block;width:0;height:0;border:5px inset;border-color:transparent #2ba6cb transparent transparent;border-right-style:solid;border-left-width:0}.dropdown.menu.large-vertical>li.opens-right>a:after{content:'';display:block;width:0;height:0;border:5px inset;border-color:transparent transparent transparent #2ba6cb;border-left-style:solid;border-right-width:0}}.dropdown.menu.align-right .is-dropdown-submenu.first-sub{top:100%;left:auto;right:0}.is-dropdown-menu.vertical{width:100px}.is-dropdown-menu.vertical.align-right{float:right}.is-dropdown-submenu-parent{position:relative}.is-dropdown-submenu-parent a:after{position:absolute;top:50%;right:5px;margin-top:-2px}.is-dropdown-submenu-parent.opens-inner>.is-dropdown-submenu{top:100%;left:auto}.is-dropdown-submenu-parent.opens-left>.is-dropdown-submenu{left:auto;right:100%}.is-dropdown-submenu-parent.opens-right>.is-dropdown-submenu{right:auto;left:100%}.is-dropdown-submenu{display:none;position:absolute;top:0;left:100%;min-width:200px;z-index:1;background:#fefefe;border:1px solid #cacaca}.is-dropdown-submenu .is-dropdown-submenu-parent>a:after{right:14px;margin-top:-3px}.is-dropdown-submenu .is-dropdown-submenu-parent.opens-left>a:after{content:'';display:block;width:0;height:0;border:5px inset;border-color:transparent #2ba6cb transparent transparent;border-right-style:solid;border-left-width:0}.is-dropdown-submenu .is-dropdown-submenu-parent.opens-right>a:after{content:'';display:block;width:0;height:0;border:5px inset;border-color:transparent transparent transparent #2ba6cb;border-left-style:solid;border-right-width:0}.is-dropdown-submenu .is-dropdown-submenu{margin-top:-1px}.is-dropdown-submenu>li{width:100%}.is-dropdown-submenu.js-dropdown-active{display:block}.title-bar{background:#0a0a0a;color:#fefefe;padding:.5rem;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between}.title-bar .menu-icon{margin-left:.25rem;margin-right:.25rem}.title-bar-left,.title-bar-right{-webkit-flex:1 1 0px;-ms-flex:1 1 0px;flex:1 1 0px}.title-bar-right{text-align:right}.title-bar-title{font-weight:700;vertical-align:middle;display:inline-block}.top-bar{display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;-webkit-flex-wrap:nowrap;-ms-flex-wrap:nowrap;flex-wrap:nowrap;padding:.5rem;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap}.top-bar,.top-bar ul{background-color:#e6e6e6}.top-bar input{max-width:200px;margin-right:1rem}.top-bar .input-group-field{width:100%;margin-right:0}.top-bar input.button{width:auto}.top-bar .top-bar-left,.top-bar .top-bar-right{-webkit-flex:0 0 100%;-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}@media screen and (min-width:40em){.top-bar{-webkit-flex-wrap:nowrap;-ms-flex-wrap:nowrap;flex-wrap:nowrap}.top-bar .top-bar-left,.top-bar .top-bar-right{-webkit-flex:1 1 0px;-ms-flex:1 1 0px;flex:1 1 0px}}@media screen and (max-width:63.9375em){.top-bar.stacked-for-medium{-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap}.top-bar.stacked-for-medium .top-bar-left,.top-bar.stacked-for-medium .top-bar-right{-webkit-flex:0 0 100%;-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}}@media screen and (max-width:74.9375em){.top-bar.stacked-for-large{-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap}.top-bar.stacked-for-large .top-bar-left,.top-bar.stacked-for-large .top-bar-right{-webkit-flex:0 0 100%;-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}}.top-bar-title{margin-right:1rem}.top-bar-left,.top-bar-right,.top-bar-title{-webkit-flex:0 0 auto;-ms-flex:0 0 auto;flex:0 0 auto}.breadcrumbs{list-style:none;margin:0 0 1rem}.breadcrumbs:after,.breadcrumbs:before{content:' ';display:table;-webkit-flex-basis:0;-ms-flex-preferred-size:0;flex-basis:0;-webkit-order:1;-ms-flex-order:1;order:1}.breadcrumbs:after{clear:both}.breadcrumbs li{float:left;color:#0a0a0a;font-size:.6875rem;cursor:default;text-transform:uppercase}.breadcrumbs li:not(:last-child):after{color:#cacaca;content:"/";margin:0 .75rem;position:relative;top:1px;opacity:1}.breadcrumbs a{color:#2ba6cb}.breadcrumbs a:hover{text-decoration:underline}.breadcrumbs .disabled{color:#cacaca;cursor:not-allowed}.pagination{margin-left:0;margin-bottom:1rem}.pagination:after,.pagination:before{content:' ';display:table;-webkit-flex-basis:0;-ms-flex-preferred-size:0;flex-basis:0;-webkit-order:1;-ms-flex-order:1;order:1}.pagination:after{clear:both}.pagination li{font-size:.875rem;margin-right:.0625rem;border-radius:3px;display:none}.pagination li:first-child,.pagination li:last-child{display:inline-block}@media screen and (min-width:40em){.pagination li{display:inline-block}}.pagination a,.pagination button{color:#0a0a0a;display:block;padding:.1875rem .625rem;border-radius:3px}.pagination a:hover,.pagination button:hover{background:#e6e6e6}.pagination .current{padding:.1875rem .625rem;background:#2ba6cb;color:#fefefe;cursor:default}.pagination .disabled{padding:.1875rem .625rem;color:#cacaca;cursor:not-allowed}.pagination .disabled:hover{background:transparent}.pagination .ellipsis:after{content:'\2026';padding:.1875rem .625rem;color:#0a0a0a}.pagination-previous.disabled:before,.pagination-previous a:before{content:'\00ab';display:inline-block;margin-right:.5rem}.pagination-next.disabled:after,.pagination-next a:after{content:'\00bb';display:inline-block;margin-left:.5rem}.accordion{list-style-type:none;background:#fefefe;margin-left:0}.accordion-item:first-child>:first-child{border-radius:3px 3px 0 0}.accordion-item:last-child>:last-child{border-radius:0 0 3px 3px}.accordion-title{display:block;padding:1.25rem 1rem;line-height:1;font-size:.75rem;color:#2ba6cb;position:relative;border:1px solid #e6e6e6;border-bottom:0}:last-child:not(.is-active)>.accordion-title{border-radius:0 0 3px 3px;border-bottom:1px solid #e6e6e6}.accordion-title:focus,.accordion-title:hover{background-color:#e6e6e6}.accordion-title:before{content:'+';position:absolute;right:1rem;top:50%;margin-top:-.5rem}.is-active>.accordion-title:before{content:'–'}.accordion-content{padding:1rem;display:none;border:1px solid #e6e6e6;border-bottom:0;background-color:#fefefe;color:#0a0a0a}:last-child>.accordion-content:last-child{border-bottom:1px solid #e6e6e6}.dropdown-pane{background-color:#fefefe;border:1px solid #cacaca;border-radius:3px;display:block;font-size:1rem;padding:1rem;position:absolute;visibility:hidden;width:300px;z-index:3}.dropdown-pane.is-open{visibility:visible}.dropdown-pane.tiny{width:100px}.dropdown-pane.small{width:200px}.dropdown-pane.large{width:400px}body,html{height:100%}.off-canvas-wrapper{width:100%;overflow-x:hidden;position:relative;-webkit-backface-visibility:hidden;backface-visibility:hidden;-webkit-overflow-scrolling:auto}.off-canvas-wrapper-inner{position:relative;width:100%;transition:-webkit-transform .5s ease;transition:transform .5s ease}.off-canvas-wrapper-inner:after,.off-canvas-wrapper-inner:before{content:' ';display:table;-webkit-flex-basis:0;-ms-flex-preferred-size:0;flex-basis:0;-webkit-order:1;-ms-flex-order:1;order:1}.off-canvas-wrapper-inner:after{clear:both}.off-canvas-content{min-height:100%;background:#fefefe;transition:-webkit-transform .5s ease;transition:transform .5s ease;-webkit-backface-visibility:hidden;backface-visibility:hidden;z-index:1;padding-bottom:.1px;box-shadow:0 0 10px hsla(0,0%,4%,.5)}.js-off-canvas-exit{display:none;position:absolute;top:0;left:0;width:100%;height:100%;background:hsla(0,0%,100%,.25);cursor:pointer;transition:background .5s ease}.off-canvas{position:absolute;background:#e6e6e6;z-index:-1;max-height:100%;overflow-y:auto;-webkit-transform:translateX(0);transform:translateX(0)}[data-whatinput=mouse] .off-canvas{outline:0}.off-canvas.position-left{left:-250px;top:0;width:250px}.is-open-left{-webkit-transform:translateX(250px);transform:translateX(250px)}.off-canvas.position-right{right:-250px;top:0;width:250px}.is-open-right{-webkit-transform:translateX(-250px);transform:translateX(-250px)}@media screen and (min-width:40em){.position-left.reveal-for-medium{left:0;z-index:auto;position:fixed}.position-left.reveal-for-medium~.off-canvas-content{margin-left:250px}.position-right.reveal-for-medium{right:0;z-index:auto;position:fixed}.position-right.reveal-for-medium~.off-canvas-content{margin-right:250px}}@media screen and (min-width:64em){.position-left.reveal-for-large{left:0;z-index:auto;position:fixed}.position-left.reveal-for-large~.off-canvas-content{margin-left:250px}.position-right.reveal-for-large{right:0;z-index:auto;position:fixed}.position-right.reveal-for-large~.off-canvas-content{margin-right:250px}}.tabs{margin:0;list-style-type:none;background:#fefefe;border:1px solid #e6e6e6}.tabs:after,.tabs:before{content:' ';display:table;-webkit-flex-basis:0;-ms-flex-preferred-size:0;flex-basis:0;-webkit-order:1;-ms-flex-order:1;order:1}.tabs:after{clear:both}.tabs.vertical>li{width:auto;float:none;display:block}.tabs.simple>li>a{padding:0}.tabs.simple>li>a:hover{background:transparent}.tabs.primary{background:#2ba6cb}.tabs.primary>li>a{color:#fefefe}.tabs.primary>li>a:focus,.tabs.primary>li>a:hover{background:#299ec1}.tabs-title{float:left}.tabs-title>a{display:block;padding:1.25rem 1.5rem;line-height:1;font-size:.75rem}.tabs-title>a:hover{background:#fefefe}.tabs-title>a:focus,.tabs-title>a[aria-selected=true]{background:#e6e6e6}.tabs-content{background:#fefefe;transition:all .5s ease;border:1px solid #e6e6e6;border-top:0}.tabs-content.vertical{border:1px solid #e6e6e6;border-left:0}.tabs-panel{display:none;padding:1rem}.tabs-panel.is-active{display:block}.callout{margin:0 0 1rem;padding:1rem;border:1px solid hsla(0,0%,4%,.25);border-radius:3px;position:relative;color:#0a0a0a;background-color:#fff}.callout>:first-child{margin-top:0}.callout>:last-child{margin-bottom:0}.callout.primary{background-color:#def2f8}.callout.secondary{background-color:#fcfcfc}.callout.alert{background-color:#fcd6d6}.callout.success{background-color:#e6f7d9}.callout.warning{background-color:#fff3d9}.callout.body-font,.callout.header{background-color:#dedede}.callout.small{padding:.5rem}.callout.large{padding:3rem}.media-object{margin-bottom:1rem;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-wrap:nowrap;-ms-flex-wrap:nowrap;flex-wrap:nowrap}.media-object img{max-width:none}@media screen and (max-width:39.9375em){.media-object.stack-for-small{-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap}}@media screen and (max-width:39.9375em){.media-object.stack-for-small .media-object-section{padding:0;padding-bottom:1rem;-webkit-flex-basis:100%;-ms-flex-preferred-size:100%;flex-basis:100%;max-width:100%}.media-object.stack-for-small .media-object-section img{width:100%}}.media-object-section{-webkit-flex:0 1 auto;-ms-flex:0 1 auto;flex:0 1 auto}.media-object-section:first-child{padding-right:1rem}.media-object-section:last-child:not(:nth-child(2)){padding-left:1rem}.media-object-section>:last-child{margin-bottom:0}.media-object-section.main-section{-webkit-flex:1 1 0px;-ms-flex:1 1 0px;flex:1 1 0px}body.is-reveal-open{overflow:hidden}html.is-reveal-open,html.is-reveal-open body{height:100%;overflow:hidden;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.reveal-overlay{display:none;position:fixed;top:0;bottom:0;left:0;right:0;z-index:4;background-color:hsla(0,0%,4%,.45);overflow-y:scroll}.reveal{display:none;z-index:5;padding:1rem;border:1px solid #cacaca;background-color:#fefefe;border-radius:3px;position:relative;top:100px;margin-left:auto;margin-right:auto;overflow-y:auto}[data-whatinput=mouse] .reveal{outline:0}@media screen and (min-width:40em){.reveal{min-height:0}}.reveal .column,.reveal .columns{min-width:0}.reveal>:last-child{margin-bottom:0}@media screen and (min-width:40em){.reveal{width:600px;max-width:62.5rem}}@media screen and (min-width:40em){.reveal .reveal{left:auto;right:auto;margin:0 auto}}.reveal.collapse{padding:0}@media screen and (min-width:40em){.reveal.tiny{width:30%;max-width:62.5rem}}@media screen and (min-width:40em){.reveal.small{width:50%;max-width:62.5rem}}@media screen and (min-width:40em){.reveal.large{width:90%;max-width:62.5rem}}.reveal.full{top:0;left:0;width:100%;height:100%;height:100vh;min-height:100vh;max-width:none;margin-left:0;border:0;border-radius:0}@media screen and (max-width:39.9375em){.reveal{top:0;left:0;width:100%;height:100%;height:100vh;min-height:100vh;max-width:none;margin-left:0;border:0;border-radius:0}}.reveal.without-overlay{position:fixed}table{width:100%;margin-bottom:1rem;border-radius:3px}table tbody,table tfoot,table thead{border:1px solid #f1f1f1;background-color:#fefefe}table caption{font-weight:700;padding:.5rem .625rem .625rem}table tfoot,table thead{background:#f8f8f8;color:#0a0a0a}table tfoot tr,table thead tr{background:transparent}table tfoot td,table tfoot th,table thead td,table thead th{padding:.5rem .625rem .625rem;font-weight:700;text-align:left}table tbody tr:nth-child(even){background-color:#f1f1f1}table tbody td,table tbody th{padding:.5rem .625rem .625rem}@media screen and (max-width:63.9375em){table.stack tfoot,table.stack thead{display:none}table.stack td,table.stack th,table.stack tr{display:block}table.stack td{border-top:0}}table.scroll{display:block;width:100%;overflow-x:auto}table.hover tr:hover{background-color:#f9f9f9}table.hover tr:nth-of-type(even):hover{background-color:#ececec}.table-scroll{overflow-x:auto}.table-scroll table{width:auto}.badge{display:inline-block;padding:.3em;min-width:2.1em;font-size:.6rem;text-align:center;border-radius:50%;background:#2ba6cb;color:#fefefe}.badge.secondary{background:#e9e9e9;color:#0a0a0a}.badge.alert{background:#c60f13;color:#fefefe}.badge.success{background:#5da423;color:#fefefe}.badge.warning{background:#ffae00;color:#fefefe}.badge.body-font,.badge.header{background:#222;color:#fefefe}.label{display:inline-block;padding:.33333rem .5rem;font-size:.8rem;line-height:1;white-space:nowrap;cursor:default;border-radius:3px;background:#2ba6cb;color:#fefefe}.label.secondary{background:#e9e9e9;color:#0a0a0a}.label.alert{background:#c60f13;color:#fefefe}.label.success{background:#5da423;color:#fefefe}.label.warning{background:#ffae00;color:#fefefe}.label.body-font,.label.header{background:#222;color:#fefefe}.progress{background-color:#cacaca;height:1rem;margin-bottom:1rem;border-radius:3px}.progress.primary .progress-meter{background-color:#2ba6cb}.progress.secondary .progress-meter{background-color:#e9e9e9}.progress.alert .progress-meter{background-color:#c60f13}.progress.success .progress-meter{background-color:#5da423}.progress.warning .progress-meter{background-color:#ffae00}.progress.body-font .progress-meter,.progress.header .progress-meter{background-color:#222}.progress-meter{position:relative;display:block;width:0;height:100%;background-color:#2ba6cb;border-radius:3px}.progress-meter-text{top:50%;left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);position:absolute;margin:0;font-size:.75rem;font-weight:700;color:#fefefe;white-space:nowrap;border-radius:3px}.has-tip{border-bottom:1px dotted #8a8a8a;font-weight:700;position:relative;display:inline-block;cursor:help}.tooltip{background-color:#0a0a0a;color:#fefefe;font-size:80%;padding:.75rem;position:absolute;z-index:3;top:calc(100% + .6495rem);max-width:10rem!important;border-radius:3px}.tooltip:before{border-color:transparent transparent #0a0a0a;border-bottom-style:solid;border-top-width:0;bottom:100%;position:absolute;left:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%)}.tooltip.top:before,.tooltip:before{content:'';display:block;width:0;height:0;border:.75rem inset}.tooltip.top:before{border-color:#0a0a0a transparent transparent;border-top-style:solid;border-bottom-width:0;top:100%;bottom:auto}.tooltip.left:before{border-color:transparent transparent transparent #0a0a0a;border-left-style:solid;border-right-width:0;left:100%}.tooltip.left:before,.tooltip.right:before{content:'';display:block;width:0;height:0;border:.75rem inset;bottom:auto;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.tooltip.right:before{border-color:transparent #0a0a0a transparent transparent;border-right-style:solid;border-left-width:0;left:auto;right:100%}.flex-video{position:relative;height:0;padding-bottom:75%;margin-bottom:1rem;overflow:hidden}.flex-video embed,.flex-video iframe,.flex-video object,.flex-video video{position:absolute;top:0;left:0;width:100%;height:100%}.flex-video.widescreen{padding-bottom:56.25%}.flex-video.vimeo{padding-top:0}.orbit,.orbit-container{position:relative}.orbit-container{margin:0;overflow:hidden;list-style:none}.orbit-slide{width:100%;max-height:100%}.orbit-slide.no-motionui.is-active{top:0;left:0}.orbit-figure{margin:0}.orbit-image{margin:0;width:100%;max-width:100%}.orbit-caption{bottom:0;width:100%;margin-bottom:0;background-color:hsla(0,0%,4%,.5)}.orbit-caption,.orbit-next,.orbit-previous{position:absolute;padding:1rem;color:#fefefe}.orbit-next,.orbit-previous{top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);z-index:3}[data-whatinput=mouse] .orbit-next,[data-whatinput=mouse] .orbit-previous{outline:0}.orbit-next:active,.orbit-next:focus,.orbit-next:hover,.orbit-previous:active,.orbit-previous:focus,.orbit-previous:hover{background-color:hsla(0,0%,4%,.5)}.orbit-previous{left:0}.orbit-next{left:auto;right:0}.orbit-bullets{position:relative;margin-top:.8rem;margin-bottom:.8rem;text-align:center}[data-whatinput=mouse] .orbit-bullets{outline:0}.orbit-bullets button{width:1.2rem;height:1.2rem;margin:.1rem;background-color:#cacaca;border-radius:50%}.orbit-bullets button.is-active,.orbit-bullets button:hover{background-color:#8a8a8a}.thumbnail{border:4px solid #fefefe;box-shadow:0 0 0 1px hsla(0,0%,4%,.2);display:inline-block;line-height:0;max-width:100%;transition:box-shadow .2s ease-out;border-radius:3px;margin-bottom:1rem}.thumbnail:focus,.thumbnail:hover{box-shadow:0 0 6px 1px rgba(43,166,203,.5)}.sticky-container{position:relative}.sticky{position:absolute;z-index:0;-webkit-transform:translateZ(0);transform:translateZ(0)}.sticky.is-stuck{position:fixed;z-index:2}.sticky.is-stuck.is-at-top{top:0}.sticky.is-stuck.is-at-bottom{bottom:0}.sticky.is-anchored{position:absolute;left:auto;right:auto}.sticky.is-anchored.is-at-bottom{bottom:0}.row{max-width:62.5rem;margin-left:auto;margin-right:auto;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-flow:row wrap;-ms-flex-flow:row wrap;flex-flow:row wrap}.row .row{margin-left:-.9375rem;margin-right:-.9375rem}.row.expanded,.row .row{max-width:none}.row.collapse>.column,.row.collapse>.columns{padding-left:0;padding-right:0}.column,.columns{-webkit-flex:1 1 0px;-ms-flex:1 1 0px;flex:1 1 0px;padding-left:.9375rem;padding-right:.9375rem;min-width:initial}.column.row.row,.row.row.columns{float:none;display:block}.row .column.row.row,.row .row.row.columns{padding-left:0;padding-right:0;margin-left:0;margin-right:0}.small-1{-webkit-flex:0 0 8.33333%;-ms-flex:0 0 8.33333%;flex:0 0 8.33333%;max-width:8.33333%}.small-offset-0{margin-left:0}.small-2{-webkit-flex:0 0 16.66667%;-ms-flex:0 0 16.66667%;flex:0 0 16.66667%;max-width:16.66667%}.small-offset-1{margin-left:8.33333%}.small-3{-webkit-flex:0 0 25%;-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}.small-offset-2{margin-left:16.66667%}.small-4{-webkit-flex:0 0 33.33333%;-ms-flex:0 0 33.33333%;flex:0 0 33.33333%;max-width:33.33333%}.small-offset-3{margin-left:25%}.small-5{-webkit-flex:0 0 41.66667%;-ms-flex:0 0 41.66667%;flex:0 0 41.66667%;max-width:41.66667%}.small-offset-4{margin-left:33.33333%}.small-6{-webkit-flex:0 0 50%;-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}.small-offset-5{margin-left:41.66667%}.small-7{-webkit-flex:0 0 58.33333%;-ms-flex:0 0 58.33333%;flex:0 0 58.33333%;max-width:58.33333%}.small-offset-6{margin-left:50%}.small-8{-webkit-flex:0 0 66.66667%;-ms-flex:0 0 66.66667%;flex:0 0 66.66667%;max-width:66.66667%}.small-offset-7{margin-left:58.33333%}.small-9{-webkit-flex:0 0 75%;-ms-flex:0 0 75%;flex:0 0 75%;max-width:75%}.small-offset-8{margin-left:66.66667%}.small-10{-webkit-flex:0 0 83.33333%;-ms-flex:0 0 83.33333%;flex:0 0 83.33333%;max-width:83.33333%}.small-offset-9{margin-left:75%}.small-11{-webkit-flex:0 0 91.66667%;-ms-flex:0 0 91.66667%;flex:0 0 91.66667%;max-width:91.66667%}.small-offset-10{margin-left:83.33333%}.small-12{-webkit-flex:0 0 100%;-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}.small-offset-11{margin-left:91.66667%}.small-up-1{-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap}.small-up-1>.column,.small-up-1>.columns{-webkit-flex:0 0 100%;-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}.small-up-2{-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap}.small-up-2>.column,.small-up-2>.columns{-webkit-flex:0 0 50%;-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}.small-up-3{-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap}.small-up-3>.column,.small-up-3>.columns{-webkit-flex:0 0 33.33333%;-ms-flex:0 0 33.33333%;flex:0 0 33.33333%;max-width:33.33333%}.small-up-4{-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap}.small-up-4>.column,.small-up-4>.columns{-webkit-flex:0 0 25%;-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}.small-up-5{-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap}.small-up-5>.column,.small-up-5>.columns{-webkit-flex:0 0 20%;-ms-flex:0 0 20%;flex:0 0 20%;max-width:20%}.small-up-6{-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap}.small-up-6>.column,.small-up-6>.columns{-webkit-flex:0 0 16.66667%;-ms-flex:0 0 16.66667%;flex:0 0 16.66667%;max-width:16.66667%}.small-up-7{-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap}.small-up-7>.column,.small-up-7>.columns{-webkit-flex:0 0 14.28571%;-ms-flex:0 0 14.28571%;flex:0 0 14.28571%;max-width:14.28571%}.small-up-8{-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap}.small-up-8>.column,.small-up-8>.columns{-webkit-flex:0 0 12.5%;-ms-flex:0 0 12.5%;flex:0 0 12.5%;max-width:12.5%}.small-collapse>.column,.small-collapse>.columns{padding-left:0;padding-right:0}.small-uncollapse>.column,.small-uncollapse>.columns{padding-left:.9375rem;padding-right:.9375rem}@media screen and (min-width:40em){.medium-1{-webkit-flex:0 0 8.33333%;-ms-flex:0 0 8.33333%;flex:0 0 8.33333%;max-width:8.33333%}.medium-offset-0{margin-left:0}.medium-2{-webkit-flex:0 0 16.66667%;-ms-flex:0 0 16.66667%;flex:0 0 16.66667%;max-width:16.66667%}.medium-offset-1{margin-left:8.33333%}.medium-3{-webkit-flex:0 0 25%;-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}.medium-offset-2{margin-left:16.66667%}.medium-4{-webkit-flex:0 0 33.33333%;-ms-flex:0 0 33.33333%;flex:0 0 33.33333%;max-width:33.33333%}.medium-offset-3{margin-left:25%}.medium-5{-webkit-flex:0 0 41.66667%;-ms-flex:0 0 41.66667%;flex:0 0 41.66667%;max-width:41.66667%}.medium-offset-4{margin-left:33.33333%}.medium-6{-webkit-flex:0 0 50%;-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}.medium-offset-5{margin-left:41.66667%}.medium-7{-webkit-flex:0 0 58.33333%;-ms-flex:0 0 58.33333%;flex:0 0 58.33333%;max-width:58.33333%}.medium-offset-6{margin-left:50%}.medium-8{-webkit-flex:0 0 66.66667%;-ms-flex:0 0 66.66667%;flex:0 0 66.66667%;max-width:66.66667%}.medium-offset-7{margin-left:58.33333%}.medium-9{-webkit-flex:0 0 75%;-ms-flex:0 0 75%;flex:0 0 75%;max-width:75%}.medium-offset-8{margin-left:66.66667%}.medium-10{-webkit-flex:0 0 83.33333%;-ms-flex:0 0 83.33333%;flex:0 0 83.33333%;max-width:83.33333%}.medium-offset-9{margin-left:75%}.medium-11{-webkit-flex:0 0 91.66667%;-ms-flex:0 0 91.66667%;flex:0 0 91.66667%;max-width:91.66667%}.medium-offset-10{margin-left:83.33333%}.medium-12{-webkit-flex:0 0 100%;-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}.medium-offset-11{margin-left:91.66667%}.medium-order-1{-webkit-order:1;-ms-flex-order:1;order:1}.medium-order-2{-webkit-order:2;-ms-flex-order:2;order:2}.medium-order-3{-webkit-order:3;-ms-flex-order:3;order:3}.medium-order-4{-webkit-order:4;-ms-flex-order:4;order:4}.medium-order-5{-webkit-order:5;-ms-flex-order:5;order:5}.medium-order-6{-webkit-order:6;-ms-flex-order:6;order:6}.medium-up-1{-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap}.medium-up-1>.column,.medium-up-1>.columns{-webkit-flex:0 0 100%;-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}.medium-up-2{-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap}.medium-up-2>.column,.medium-up-2>.columns{-webkit-flex:0 0 50%;-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}.medium-up-3{-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap}.medium-up-3>.column,.medium-up-3>.columns{-webkit-flex:0 0 33.33333%;-ms-flex:0 0 33.33333%;flex:0 0 33.33333%;max-width:33.33333%}.medium-up-4{-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap}.medium-up-4>.column,.medium-up-4>.columns{-webkit-flex:0 0 25%;-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}.medium-up-5{-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap}.medium-up-5>.column,.medium-up-5>.columns{-webkit-flex:0 0 20%;-ms-flex:0 0 20%;flex:0 0 20%;max-width:20%}.medium-up-6{-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap}.medium-up-6>.column,.medium-up-6>.columns{-webkit-flex:0 0 16.66667%;-ms-flex:0 0 16.66667%;flex:0 0 16.66667%;max-width:16.66667%}.medium-up-7{-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap}.medium-up-7>.column,.medium-up-7>.columns{-webkit-flex:0 0 14.28571%;-ms-flex:0 0 14.28571%;flex:0 0 14.28571%;max-width:14.28571%}.medium-up-8{-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap}.medium-up-8>.column,.medium-up-8>.columns{-webkit-flex:0 0 12.5%;-ms-flex:0 0 12.5%;flex:0 0 12.5%;max-width:12.5%}}@media screen and (min-width:40em) and (min-width:40em){.medium-expand{-webkit-flex:1 1 0px;-ms-flex:1 1 0px;flex:1 1 0px}}.row.medium-unstack>.column,.row.medium-unstack>.columns{-webkit-flex:0 0 100%;-ms-flex:0 0 100%;flex:0 0 100%}@media screen and (min-width:40em){.row.medium-unstack>.column,.row.medium-unstack>.columns{-webkit-flex:1 1 0px;-ms-flex:1 1 0px;flex:1 1 0px}}@media screen and (min-width:40em){.medium-collapse>.column,.medium-collapse>.columns{padding-left:0;padding-right:0}.medium-uncollapse>.column,.medium-uncollapse>.columns{padding-left:.9375rem;padding-right:.9375rem}}@media screen and (min-width:64em){.large-1{-webkit-flex:0 0 8.33333%;-ms-flex:0 0 8.33333%;flex:0 0 8.33333%;max-width:8.33333%}.large-offset-0{margin-left:0}.large-2{-webkit-flex:0 0 16.66667%;-ms-flex:0 0 16.66667%;flex:0 0 16.66667%;max-width:16.66667%}.large-offset-1{margin-left:8.33333%}.large-3{-webkit-flex:0 0 25%;-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}.large-offset-2{margin-left:16.66667%}.large-4{-webkit-flex:0 0 33.33333%;-ms-flex:0 0 33.33333%;flex:0 0 33.33333%;max-width:33.33333%}.large-offset-3{margin-left:25%}.large-5{-webkit-flex:0 0 41.66667%;-ms-flex:0 0 41.66667%;flex:0 0 41.66667%;max-width:41.66667%}.large-offset-4{margin-left:33.33333%}.large-6{-webkit-flex:0 0 50%;-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}.large-offset-5{margin-left:41.66667%}.large-7{-webkit-flex:0 0 58.33333%;-ms-flex:0 0 58.33333%;flex:0 0 58.33333%;max-width:58.33333%}.large-offset-6{margin-left:50%}.large-8{-webkit-flex:0 0 66.66667%;-ms-flex:0 0 66.66667%;flex:0 0 66.66667%;max-width:66.66667%}.large-offset-7{margin-left:58.33333%}.large-9{-webkit-flex:0 0 75%;-ms-flex:0 0 75%;flex:0 0 75%;max-width:75%}.large-offset-8{margin-left:66.66667%}.large-10{-webkit-flex:0 0 83.33333%;-ms-flex:0 0 83.33333%;flex:0 0 83.33333%;max-width:83.33333%}.large-offset-9{margin-left:75%}.large-11{-webkit-flex:0 0 91.66667%;-ms-flex:0 0 91.66667%;flex:0 0 91.66667%;max-width:91.66667%}.large-offset-10{margin-left:83.33333%}.large-12{-webkit-flex:0 0 100%;-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}.large-offset-11{margin-left:91.66667%}.large-order-1{-webkit-order:1;-ms-flex-order:1;order:1}.large-order-2{-webkit-order:2;-ms-flex-order:2;order:2}.large-order-3{-webkit-order:3;-ms-flex-order:3;order:3}.large-order-4{-webkit-order:4;-ms-flex-order:4;order:4}.large-order-5{-webkit-order:5;-ms-flex-order:5;order:5}.large-order-6{-webkit-order:6;-ms-flex-order:6;order:6}.large-up-1{-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap}.large-up-1>.column,.large-up-1>.columns{-webkit-flex:0 0 100%;-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}.large-up-2{-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap}.large-up-2>.column,.large-up-2>.columns{-webkit-flex:0 0 50%;-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}.large-up-3{-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap}.large-up-3>.column,.large-up-3>.columns{-webkit-flex:0 0 33.33333%;-ms-flex:0 0 33.33333%;flex:0 0 33.33333%;max-width:33.33333%}.large-up-4{-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap}.large-up-4>.column,.large-up-4>.columns{-webkit-flex:0 0 25%;-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}.large-up-5{-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap}.large-up-5>.column,.large-up-5>.columns{-webkit-flex:0 0 20%;-ms-flex:0 0 20%;flex:0 0 20%;max-width:20%}.large-up-6{-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap}.large-up-6>.column,.large-up-6>.columns{-webkit-flex:0 0 16.66667%;-ms-flex:0 0 16.66667%;flex:0 0 16.66667%;max-width:16.66667%}.large-up-7{-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap}.large-up-7>.column,.large-up-7>.columns{-webkit-flex:0 0 14.28571%;-ms-flex:0 0 14.28571%;flex:0 0 14.28571%;max-width:14.28571%}.large-up-8{-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap}.large-up-8>.column,.large-up-8>.columns{-webkit-flex:0 0 12.5%;-ms-flex:0 0 12.5%;flex:0 0 12.5%;max-width:12.5%}}@media screen and (min-width:64em) and (min-width:64em){.large-expand{-webkit-flex:1 1 0px;-ms-flex:1 1 0px;flex:1 1 0px}}.row.large-unstack>.column,.row.large-unstack>.columns{-webkit-flex:0 0 100%;-ms-flex:0 0 100%;flex:0 0 100%}@media screen and (min-width:64em){.row.large-unstack>.column,.row.large-unstack>.columns{-webkit-flex:1 1 0px;-ms-flex:1 1 0px;flex:1 1 0px}}@media screen and (min-width:64em){.large-collapse>.column,.large-collapse>.columns{padding-left:0;padding-right:0}.large-uncollapse>.column,.large-uncollapse>.columns{padding-left:.9375rem;padding-right:.9375rem}}.shrink{-webkit-flex:0 0 auto;-ms-flex:0 0 auto;flex:0 0 auto;max-width:100%}.align-top.columns,.column.align-top{-webkit-align-self:flex-start;-ms-flex-item-align:start;align-self:flex-start}.align-bottom.columns,.column.align-bottom{-webkit-align-self:flex-end;-ms-flex-item-align:end;align-self:flex-end}.align-middle.columns,.column.align-middle{-webkit-align-self:center;-ms-flex-item-align:center;align-self:center}.align-stretch.columns,.column.align-stretch{-webkit-align-self:stretch;-ms-flex-item-align:stretch;align-self:stretch}.align-right{-webkit-justify-content:flex-end;-ms-flex-pack:end;justify-content:flex-end}.align-center{-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center}.align-justify{-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between}.align-spaced{-webkit-justify-content:space-around;-ms-flex-pack:distribute;justify-content:space-around}.align-top{-webkit-align-items:flex-start;-ms-flex-align:start;align-items:flex-start}.align-self-top{-webkit-align-self:flex-start;-ms-flex-item-align:start;align-self:flex-start}.align-bottom{-webkit-align-items:flex-end;-ms-flex-align:end;align-items:flex-end}.align-self-bottom{-webkit-align-self:flex-end;-ms-flex-item-align:end;align-self:flex-end}.align-middle{-webkit-align-items:center;-ms-flex-align:center;align-items:center}.align-self-middle{-webkit-align-self:center;-ms-flex-item-align:center;align-self:center}.align-stretch{-webkit-align-items:stretch;-ms-flex-align:stretch;align-items:stretch}.align-self-stretch{-webkit-align-self:stretch;-ms-flex-item-align:stretch;align-self:stretch}.small-order-1{-webkit-order:1;-ms-flex-order:1;order:1}.small-order-2{-webkit-order:2;-ms-flex-order:2;order:2}.small-order-3{-webkit-order:3;-ms-flex-order:3;order:3}.small-order-4{-webkit-order:4;-ms-flex-order:4;order:4}.small-order-5{-webkit-order:5;-ms-flex-order:5;order:5}.small-order-6{-webkit-order:6;-ms-flex-order:6;order:6}@media screen and (min-width:40em){.medium-order-1{-webkit-order:1;-ms-flex-order:1;order:1}.medium-order-2{-webkit-order:2;-ms-flex-order:2;order:2}.medium-order-3{-webkit-order:3;-ms-flex-order:3;order:3}.medium-order-4{-webkit-order:4;-ms-flex-order:4;order:4}.medium-order-5{-webkit-order:5;-ms-flex-order:5;order:5}.medium-order-6{-webkit-order:6;-ms-flex-order:6;order:6}}@media screen and (min-width:64em){.large-order-1{-webkit-order:1;-ms-flex-order:1;order:1}.large-order-2{-webkit-order:2;-ms-flex-order:2;order:2}.large-order-3{-webkit-order:3;-ms-flex-order:3;order:3}.large-order-4{-webkit-order:4;-ms-flex-order:4;order:4}.large-order-5{-webkit-order:5;-ms-flex-order:5;order:5}.large-order-6{-webkit-order:6;-ms-flex-order:6;order:6}}.menu-icon{position:relative;display:inline-block;vertical-align:middle;cursor:pointer;width:20px;height:16px}.menu-icon:after{content:'';position:absolute;display:block;width:100%;height:2px;background:#fefefe;top:0;left:0;box-shadow:0 7px 0 #fefefe,0 14px 0 #fefefe}.menu-icon:hover:after{background:#cacaca;box-shadow:0 7px 0 #cacaca,0 14px 0 #cacaca}.menu-icon.dark{position:relative;display:inline-block;vertical-align:middle;cursor:pointer;width:20px;height:16px}.menu-icon.dark:after{content:'';position:absolute;display:block;width:100%;height:2px;background:#0a0a0a;top:0;left:0;box-shadow:0 7px 0 #0a0a0a,0 14px 0 #0a0a0a}.menu-icon.dark:hover:after{background:#8a8a8a;box-shadow:0 7px 0 #8a8a8a,0 14px 0 #8a8a8a}.slide-in-down.mui-enter{transition-duration:.5s;transition-timing-function:linear;-webkit-transform:translateY(-100%);transform:translateY(-100%);transition-property:-webkit-transform,opacity;transition-property:transform,opacity;-webkit-backface-visibility:hidden;backface-visibility:hidden}.slide-in-down.mui-enter.mui-enter-active{-webkit-transform:translateY(0);transform:translateY(0)}.slide-in-left.mui-enter{transition-duration:.5s;transition-timing-function:linear;-webkit-transform:translateX(-100%);transform:translateX(-100%);transition-property:-webkit-transform,opacity;transition-property:transform,opacity;-webkit-backface-visibility:hidden;backface-visibility:hidden}.slide-in-left.mui-enter.mui-enter-active{-webkit-transform:translateX(0);transform:translateX(0)}.slide-in-up.mui-enter{transition-duration:.5s;transition-timing-function:linear;-webkit-transform:translateY(100%);transform:translateY(100%);transition-property:-webkit-transform,opacity;transition-property:transform,opacity;-webkit-backface-visibility:hidden;backface-visibility:hidden}.slide-in-up.mui-enter.mui-enter-active{-webkit-transform:translateY(0);transform:translateY(0)}.slide-in-right.mui-enter{transition-duration:.5s;transition-timing-function:linear;-webkit-transform:translateX(100%);transform:translateX(100%);transition-property:-webkit-transform,opacity;transition-property:transform,opacity;-webkit-backface-visibility:hidden;backface-visibility:hidden}.slide-in-right.mui-enter.mui-enter-active{-webkit-transform:translateX(0);transform:translateX(0)}.slide-out-down.mui-leave{transition-duration:.5s;transition-timing-function:linear;-webkit-transform:translateY(0);transform:translateY(0);transition-property:-webkit-transform,opacity;transition-property:transform,opacity;-webkit-backface-visibility:hidden;backface-visibility:hidden}.slide-out-down.mui-leave.mui-leave-active{-webkit-transform:translateY(100%);transform:translateY(100%)}.slide-out-right.mui-leave{transition-duration:.5s;transition-timing-function:linear;-webkit-transform:translateX(0);transform:translateX(0);transition-property:-webkit-transform,opacity;transition-property:transform,opacity;-webkit-backface-visibility:hidden;backface-visibility:hidden}.slide-out-right.mui-leave.mui-leave-active{-webkit-transform:translateX(100%);transform:translateX(100%)}.slide-out-up.mui-leave{transition-duration:.5s;transition-timing-function:linear;-webkit-transform:translateY(0);transform:translateY(0);transition-property:-webkit-transform,opacity;transition-property:transform,opacity;-webkit-backface-visibility:hidden;backface-visibility:hidden}.slide-out-up.mui-leave.mui-leave-active{-webkit-transform:translateY(-100%);transform:translateY(-100%)}.slide-out-left.mui-leave{transition-duration:.5s;transition-timing-function:linear;-webkit-transform:translateX(0);transform:translateX(0);transition-property:-webkit-transform,opacity;transition-property:transform,opacity;-webkit-backface-visibility:hidden;backface-visibility:hidden}.slide-out-left.mui-leave.mui-leave-active{-webkit-transform:translateX(-100%);transform:translateX(-100%)}.fade-in.mui-enter{transition-duration:.5s;transition-timing-function:linear;opacity:0;transition-property:opacity}.fade-in.mui-enter.mui-enter-active{opacity:1}.fade-out.mui-leave{transition-duration:.5s;transition-timing-function:linear;opacity:1;transition-property:opacity}.fade-out.mui-leave.mui-leave-active{opacity:0}.hinge-in-from-top.mui-enter{transition-duration:.5s;transition-timing-function:linear;-webkit-transform:perspective(2000px) rotateX(-90deg);transform:perspective(2000px) rotateX(-90deg);-webkit-transform-origin:top;transform-origin:top;transition-property:-webkit-transform,opacity;transition-property:transform,opacity;opacity:0}.hinge-in-from-top.mui-enter.mui-enter-active{-webkit-transform:perspective(2000px) rotate(0deg);transform:perspective(2000px) rotate(0deg);opacity:1}.hinge-in-from-right.mui-enter{transition-duration:.5s;transition-timing-function:linear;-webkit-transform:perspective(2000px) rotateY(-90deg);transform:perspective(2000px) rotateY(-90deg);-webkit-transform-origin:right;transform-origin:right;transition-property:-webkit-transform,opacity;transition-property:transform,opacity;opacity:0}.hinge-in-from-right.mui-enter.mui-enter-active{-webkit-transform:perspective(2000px) rotate(0deg);transform:perspective(2000px) rotate(0deg);opacity:1}.hinge-in-from-bottom.mui-enter{transition-duration:.5s;transition-timing-function:linear;-webkit-transform:perspective(2000px) rotateX(90deg);transform:perspective(2000px) rotateX(90deg);-webkit-transform-origin:bottom;transform-origin:bottom;transition-property:-webkit-transform,opacity;transition-property:transform,opacity;opacity:0}.hinge-in-from-bottom.mui-enter.mui-enter-active{-webkit-transform:perspective(2000px) rotate(0deg);transform:perspective(2000px) rotate(0deg);opacity:1}.hinge-in-from-left.mui-enter{transition-duration:.5s;transition-timing-function:linear;-webkit-transform:perspective(2000px) rotateY(90deg);transform:perspective(2000px) rotateY(90deg);-webkit-transform-origin:left;transform-origin:left;transition-property:-webkit-transform,opacity;transition-property:transform,opacity;opacity:0}.hinge-in-from-left.mui-enter.mui-enter-active{-webkit-transform:perspective(2000px) rotate(0deg);transform:perspective(2000px) rotate(0deg);opacity:1}.hinge-in-from-middle-x.mui-enter{transition-duration:.5s;transition-timing-function:linear;-webkit-transform:perspective(2000px) rotateX(-90deg);transform:perspective(2000px) rotateX(-90deg);-webkit-transform-origin:center;transform-origin:center;transition-property:-webkit-transform,opacity;transition-property:transform,opacity;opacity:0}.hinge-in-from-middle-x.mui-enter.mui-enter-active{-webkit-transform:perspective(2000px) rotate(0deg);transform:perspective(2000px) rotate(0deg);opacity:1}.hinge-in-from-middle-y.mui-enter{transition-duration:.5s;transition-timing-function:linear;-webkit-transform:perspective(2000px) rotateY(-90deg);transform:perspective(2000px) rotateY(-90deg);-webkit-transform-origin:center;transform-origin:center;transition-property:-webkit-transform,opacity;transition-property:transform,opacity;opacity:0}.hinge-in-from-middle-y.mui-enter.mui-enter-active,.hinge-out-from-top.mui-leave{-webkit-transform:perspective(2000px) rotate(0deg);transform:perspective(2000px) rotate(0deg);opacity:1}.hinge-out-from-top.mui-leave{transition-duration:.5s;transition-timing-function:linear;-webkit-transform-origin:top;transform-origin:top;transition-property:-webkit-transform,opacity;transition-property:transform,opacity}.hinge-out-from-top.mui-leave.mui-leave-active{-webkit-transform:perspective(2000px) rotateX(-90deg);transform:perspective(2000px) rotateX(-90deg);opacity:0}.hinge-out-from-right.mui-leave{transition-duration:.5s;transition-timing-function:linear;-webkit-transform:perspective(2000px) rotate(0deg);transform:perspective(2000px) rotate(0deg);-webkit-transform-origin:right;transform-origin:right;transition-property:-webkit-transform,opacity;transition-property:transform,opacity;opacity:1}.hinge-out-from-right.mui-leave.mui-leave-active{-webkit-transform:perspective(2000px) rotateY(-90deg);transform:perspective(2000px) rotateY(-90deg);opacity:0}.hinge-out-from-bottom.mui-leave{transition-duration:.5s;transition-timing-function:linear;-webkit-transform:perspective(2000px) rotate(0deg);transform:perspective(2000px) rotate(0deg);-webkit-transform-origin:bottom;transform-origin:bottom;transition-property:-webkit-transform,opacity;transition-property:transform,opacity;opacity:1}.hinge-out-from-bottom.mui-leave.mui-leave-active{-webkit-transform:perspective(2000px) rotateX(90deg);transform:perspective(2000px) rotateX(90deg);opacity:0}.hinge-out-from-left.mui-leave{transition-duration:.5s;transition-timing-function:linear;-webkit-transform:perspective(2000px) rotate(0deg);transform:perspective(2000px) rotate(0deg);-webkit-transform-origin:left;transform-origin:left;transition-property:-webkit-transform,opacity;transition-property:transform,opacity;opacity:1}.hinge-out-from-left.mui-leave.mui-leave-active{-webkit-transform:perspective(2000px) rotateY(90deg);transform:perspective(2000px) rotateY(90deg);opacity:0}.hinge-out-from-middle-x.mui-leave{transition-duration:.5s;transition-timing-function:linear;-webkit-transform:perspective(2000px) rotate(0deg);transform:perspective(2000px) rotate(0deg);-webkit-transform-origin:center;transform-origin:center;transition-property:-webkit-transform,opacity;transition-property:transform,opacity;opacity:1}.hinge-out-from-middle-x.mui-leave.mui-leave-active{-webkit-transform:perspective(2000px) rotateX(-90deg);transform:perspective(2000px) rotateX(-90deg);opacity:0}.hinge-out-from-middle-y.mui-leave{transition-duration:.5s;transition-timing-function:linear;-webkit-transform:perspective(2000px) rotate(0deg);transform:perspective(2000px) rotate(0deg);-webkit-transform-origin:center;transform-origin:center;transition-property:-webkit-transform,opacity;transition-property:transform,opacity;opacity:1}.hinge-out-from-middle-y.mui-leave.mui-leave-active{-webkit-transform:perspective(2000px) rotateY(-90deg);transform:perspective(2000px) rotateY(-90deg);opacity:0}.scale-in-up.mui-enter{transition-duration:.5s;transition-timing-function:linear;-webkit-transform:scale(.5);transform:scale(.5);transition-property:-webkit-transform,opacity;transition-property:transform,opacity;opacity:0}.scale-in-up.mui-enter.mui-enter-active{-webkit-transform:scale(1);transform:scale(1);opacity:1}.scale-in-down.mui-enter{transition-duration:.5s;transition-timing-function:linear;-webkit-transform:scale(1.5);transform:scale(1.5);transition-property:-webkit-transform,opacity;transition-property:transform,opacity;opacity:0}.scale-in-down.mui-enter.mui-enter-active,.scale-out-up.mui-leave{-webkit-transform:scale(1);transform:scale(1);opacity:1}.scale-out-up.mui-leave{transition-duration:.5s;transition-timing-function:linear;transition-property:-webkit-transform,opacity;transition-property:transform,opacity}.scale-out-up.mui-leave.mui-leave-active{-webkit-transform:scale(1.5);transform:scale(1.5);opacity:0}.scale-out-down.mui-leave{transition-duration:.5s;transition-timing-function:linear;-webkit-transform:scale(1);transform:scale(1);transition-property:-webkit-transform,opacity;transition-property:transform,opacity;opacity:1}.scale-out-down.mui-leave.mui-leave-active{-webkit-transform:scale(.5);transform:scale(.5);opacity:0}.spin-in.mui-enter{transition-duration:.5s;transition-timing-function:linear;-webkit-transform:rotate(-270deg);transform:rotate(-270deg);transition-property:-webkit-transform,opacity;transition-property:transform,opacity;opacity:0}.spin-in.mui-enter.mui-enter-active,.spin-out.mui-leave{-webkit-transform:rotate(0);transform:rotate(0);opacity:1}.spin-out.mui-leave{transition-duration:.5s;transition-timing-function:linear;transition-property:-webkit-transform,opacity;transition-property:transform,opacity}.spin-in-ccw.mui-enter,.spin-out.mui-leave.mui-leave-active{-webkit-transform:rotate(270deg);transform:rotate(270deg);opacity:0}.spin-in-ccw.mui-enter{transition-duration:.5s;transition-timing-function:linear;transition-property:-webkit-transform,opacity;transition-property:transform,opacity}.spin-in-ccw.mui-enter.mui-enter-active,.spin-out-ccw.mui-leave{-webkit-transform:rotate(0);transform:rotate(0);opacity:1}.spin-out-ccw.mui-leave{transition-duration:.5s;transition-timing-function:linear;transition-property:-webkit-transform,opacity;transition-property:transform,opacity}.spin-out-ccw.mui-leave.mui-leave-active{-webkit-transform:rotate(-270deg);transform:rotate(-270deg);opacity:0}.slow{transition-duration:.75s!important}.fast{transition-duration:.25s!important}.linear{transition-timing-function:linear!important}.ease{transition-timing-function:ease!important}.ease-in{transition-timing-function:ease-in!important}.ease-out{transition-timing-function:ease-out!important}.ease-in-out{transition-timing-function:ease-in-out!important}.bounce-in{transition-timing-function:cubic-bezier(.485,.155,.24,1.245)!important}.bounce-out{transition-timing-function:cubic-bezier(.485,.155,.515,.845)!important}.bounce-in-out{transition-timing-function:cubic-bezier(.76,-.245,.24,1.245)!important}.short-delay{transition-delay:.3s!important}.long-delay{transition-delay:.7s!important}.shake{-webkit-animation-name:a;animation-name:a}@-webkit-keyframes a{0%,10%,20%,30%,40%,50%,60%,70%,80%,90%{-webkit-transform:translateX(7%);transform:translateX(7%)}5%,15%,25%,35%,45%,55%,65%,75%,85%,95%{-webkit-transform:translateX(-7%);transform:translateX(-7%)}}@keyframes a{0%,10%,20%,30%,40%,50%,60%,70%,80%,90%{-webkit-transform:translateX(7%);transform:translateX(7%)}5%,15%,25%,35%,45%,55%,65%,75%,85%,95%{-webkit-transform:translateX(-7%);transform:translateX(-7%)}}.spin-cw{-webkit-animation-name:b;animation-name:b}@-webkit-keyframes b{0%{-webkit-transform:rotate(-1turn);transform:rotate(-1turn)}to{-webkit-transform:rotate(0);transform:rotate(0)}}@keyframes b{0%{-webkit-transform:rotate(-1turn);transform:rotate(-1turn)}to{-webkit-transform:rotate(0);transform:rotate(0)}}.spin-ccw{-webkit-animation-name:b;animation-name:b}@keyframes b{0%{-webkit-transform:rotate(0);transform:rotate(0)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}.wiggle{-webkit-animation-name:c;animation-name:c}@-webkit-keyframes c{40%,50%,60%{-webkit-transform:rotate(7deg);transform:rotate(7deg)}35%,45%,55%,65%{-webkit-transform:rotate(-7deg);transform:rotate(-7deg)}0%,30%,70%,to{-webkit-transform:rotate(0);transform:rotate(0)}}@keyframes c{40%,50%,60%{-webkit-transform:rotate(7deg);transform:rotate(7deg)}35%,45%,55%,65%{-webkit-transform:rotate(-7deg);transform:rotate(-7deg)}0%,30%,70%,to{-webkit-transform:rotate(0);transform:rotate(0)}}.shake,.spin-ccw,.spin-cw,.wiggle{-webkit-animation-duration:.5s;animation-duration:.5s}.infinite{-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite}.slow{-webkit-animation-duration:.75s!important;animation-duration:.75s!important}.fast{-webkit-animation-duration:.25s!important;animation-duration:.25s!important}.linear{-webkit-animation-timing-function:linear!important;animation-timing-function:linear!important}.ease{-webkit-animation-timing-function:ease!important;animation-timing-function:ease!important}.ease-in{-webkit-animation-timing-function:ease-in!important;animation-timing-function:ease-in!important}.ease-out{-webkit-animation-timing-function:ease-out!important;animation-timing-function:ease-out!important}.ease-in-out{-webkit-animation-timing-function:ease-in-out!important;animation-timing-function:ease-in-out!important}.bounce-in{-webkit-animation-timing-function:cubic-bezier(.485,.155,.24,1.245)!important;animation-timing-function:cubic-bezier(.485,.155,.24,1.245)!important}.bounce-out{-webkit-animation-timing-function:cubic-bezier(.485,.155,.515,.845)!important;animation-timing-function:cubic-bezier(.485,.155,.515,.845)!important}.bounce-in-out{-webkit-animation-timing-function:cubic-bezier(.76,-.245,.24,1.245)!important;animation-timing-function:cubic-bezier(.76,-.245,.24,1.245)!important}.short-delay{-webkit-animation-delay:.3s!important;animation-delay:.3s!important}.long-delay{-webkit-animation-delay:.7s!important;animation-delay:.7s!important} -------------------------------------------------------------------------------- /src/css/popup.css: -------------------------------------------------------------------------------- 1 | body { 2 | width: 360px; 3 | overflow: hidden; 4 | } 5 | 6 | hr { 7 | margin: auto; 8 | } 9 | 10 | p { 11 | line-height: 1.44em; 12 | } 13 | 14 | .row { 15 | padding: .5em; 16 | } 17 | 18 | .row .row { 19 | margin: 0; 20 | } 21 | 22 | .panel { 23 | height: 100%; 24 | } 25 | 26 | .main-panel, 27 | .feedback-panel-form { 28 | padding-top: .5em; 29 | } 30 | 31 | .feedback-panel-form fieldset { 32 | width: 100%; 33 | } 34 | 35 | .title { 36 | font-size: 16px; 37 | margin-bottom: 0; 38 | } 39 | 40 | .feedback-btn-row { 41 | padding-top: 5.25em; 42 | padding-bottom: 5.25em; 43 | } 44 | 45 | .panel-row { 46 | padding: 0; 47 | height: 100%; 48 | } 49 | 50 | .button { 51 | background-color: #2EA3FF; 52 | border-radius: 5px; 53 | } 54 | 55 | .button:focus, .button:hover { 56 | background-color: #0c81dd; 57 | } 58 | 59 | .button.secondary { 60 | background-color: #F2F2F2; 61 | color: #1F1F1F; 62 | } 63 | 64 | .button.secondary:focus, .button.secondary:hover { 65 | background-color: #dbdbdb; 66 | color: #1F1F1F; 67 | } 68 | 69 | .toggle-label-column { 70 | font-size: 13px; 71 | } 72 | 73 | .toggle-column { 74 | text-align: right; 75 | } 76 | 77 | input ~ .switch-paddle { 78 | border-radius: 15px; 79 | background: #999999; 80 | vertical-align: middle; 81 | } 82 | 83 | input:checked ~ .switch-paddle { 84 | background: #4BD463; 85 | } 86 | 87 | .switch-paddle::after { 88 | border-radius: 15px; 89 | } 90 | 91 | #breakage-required { 92 | color: #ec5840; 93 | } 94 | 95 | .host-report > div { 96 | font-size: 13px; 97 | opacity: .9; 98 | } 99 | 100 | .host-report-date { 101 | font-weight: bold; 102 | } 103 | 104 | .radio-form { 105 | border-radius: 3px; 106 | border: 1px solid #ccc; 107 | box-sizing: border-box; 108 | display: table-cell; 109 | padding: 5px 10px; 110 | width: 100%; 111 | } 112 | 113 | .radio-form label { 114 | width: 220px; 115 | } 116 | 117 | .notes-label { 118 | display: block; 119 | font-size: 13px; 120 | line-height: 1.44em; 121 | margin-bottom: .5rem; 122 | } 123 | 124 | .breakage { 125 | margin-bottom: .5em; 126 | } 127 | 128 | #notes { 129 | font-size: 13px; 130 | resize: none; 131 | padding: 5px; 132 | } 133 | -------------------------------------------------------------------------------- /src/html/popup.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 |
14 |
15 |
Tracking Protection is enabled.
It is blocking tracker requests on this site.
16 |
Tracking Protection is disabled.
Parts of this site may be tracking your activity.
17 |
18 |
19 |
20 |
21 |
You reported a problem with this page on
.
22 |
23 |
24 |
You said this page works well on
.
25 |
26 |
27 |
28 |
29 | 33 |
34 |
35 |
36 |
37 |
38 | Tracking Protection is enabled for this site. 39 | Tracking Protection is disabled for this site. 40 |
41 |
42 | 43 | 44 | 47 | 48 |
49 |
50 |
51 | 52 |
53 |
54 | 80 |
81 |
82 | 83 |
84 |
85 | 97 |
98 |
99 | 100 | 101 | 102 | 103 | 104 | 105 | -------------------------------------------------------------------------------- /src/img/blok-48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla/blok/faac2281c48cd226b4fb8c4e22de588a02328c31/src/img/blok-48.png -------------------------------------------------------------------------------- /src/img/blok-96.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla/blok/faac2281c48cd226b4fb8c4e22de588a02328c31/src/img/blok-96.png -------------------------------------------------------------------------------- /src/img/tracking-protection-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla/blok/faac2281c48cd226b4fb8c4e22de588a02328c31/src/img/tracking-protection-16.png -------------------------------------------------------------------------------- /src/img/tracking-protection-32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla/blok/faac2281c48cd226b4fb8c4e22de588a02328c31/src/img/tracking-protection-32.png -------------------------------------------------------------------------------- /src/img/tracking-protection-disabled-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla/blok/faac2281c48cd226b4fb8c4e22de588a02328c31/src/img/tracking-protection-disabled-16.png -------------------------------------------------------------------------------- /src/img/tracking-protection-disabled-32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla/blok/faac2281c48cd226b4fb8c4e22de588a02328c31/src/img/tracking-protection-disabled-32.png -------------------------------------------------------------------------------- /src/js/background.js: -------------------------------------------------------------------------------- 1 | const {canonicalizeHost} = require('./canonicalize') 2 | const {loadLists, hostInBlocklist} = require('./lists') 3 | const {requestAllower, getRequestEntity} = require('./requests') 4 | const {log} = require('./log') 5 | 6 | // Set some explicit window variable for pageAction to access 7 | window.topFrameHostDisabled = false 8 | window.topFrameHostReport = {} 9 | 10 | var privateBrowsingMode = false 11 | var currentActiveTabID 12 | var currentActiveOrigin 13 | var blockedRequests = {} 14 | var blockedEntities = {} 15 | var allowedRequests = {} 16 | var allowedEntities = {} 17 | var totalExecTime = {} 18 | var mainFrameOriginDisabled = {} 19 | var mainFrameOriginTopHosts = {} 20 | var mainFrameOriginDisabledIndex = -1 21 | 22 | function restartBlokForTab (tabID) { 23 | blockedRequests[tabID] = [] 24 | blockedEntities[tabID] = [] 25 | allowedRequests[tabID] = [] 26 | allowedEntities[tabID] = [] 27 | totalExecTime[tabID] = 0 28 | mainFrameOriginTopHosts[tabID] = null 29 | mainFrameOriginDisabled[tabID] = false 30 | } 31 | 32 | function setWindowFrameVarsForPopup (topHost, allowedHosts, reportedHosts) { 33 | if (isOriginDisabled(topHost, allowedHosts)) { 34 | window.topFrameHostDisabled = true 35 | } else { 36 | window.topFrameHostDisabled = false 37 | } 38 | if (reportedHosts.hasOwnProperty(topHost)) { 39 | window.topFrameHostReport = reportedHosts[topHost] 40 | } else { 41 | window.topFrameHostReport = {} 42 | } 43 | } 44 | 45 | function isOriginDisabled (host, allowedHosts) { 46 | return allowedHosts.indexOf(host) > -1 47 | } 48 | 49 | function blockTrackerRequests (blocklist, allowedHosts, entityList) { 50 | return function filterRequest (requestDetails) { 51 | var blockTrackerRequestsStart = Date.now() 52 | var requestTabID = requestDetails.tabId 53 | var originTopHost 54 | var requestTopHost 55 | var requestEntity 56 | 57 | var flags = { 58 | mainOriginDisabled: false, 59 | firefoxOrigin: false, 60 | newOrigin: false, 61 | requestHostInBlocklist: false, 62 | requestIsThirdParty: false, 63 | requestHostMatchesMainFrame: false 64 | } 65 | 66 | var allowRequest = requestAllower.bind(null, requestTabID, totalExecTime, blockTrackerRequestsStart) 67 | 68 | if (privateBrowsingMode) { 69 | log('Allowing request in private browsing mode window; PBM TP will catch them.') 70 | return allowRequest() 71 | } 72 | 73 | if (typeof requestDetails.originUrl === 'undefined') { 74 | log('Allowing request from "undefined" origin - a browser internal origin.') 75 | return allowRequest() 76 | } 77 | 78 | // Determine all origin flags 79 | originTopHost = canonicalizeHost(new URL(requestDetails.originUrl).host) 80 | currentActiveOrigin = originTopHost 81 | 82 | flags.firefoxOrigin = (typeof originTopHost !== 'undefined' && originTopHost.includes('moz-nullprincipal')) 83 | flags.newOrigin = originTopHost === '' 84 | if (flags.firefoxOrigin || flags.newOrigin) { 85 | log('Allowing request from Firefox and/or new tab/window origins.') 86 | return allowRequest() 87 | } 88 | 89 | // Set main & top frame values if frameId === 0 90 | if (requestDetails.frameId === 0) { 91 | mainFrameOriginTopHosts[requestTabID] = originTopHost 92 | mainFrameOriginDisabledIndex = allowedHosts.indexOf(originTopHost) 93 | mainFrameOriginDisabled[requestTabID] = mainFrameOriginDisabledIndex > -1 94 | } 95 | 96 | requestTopHost = canonicalizeHost(new URL(requestDetails.url).host) 97 | 98 | if (mainFrameOriginDisabled[requestTabID]) { 99 | browser.pageAction.setIcon({ 100 | tabId: requestTabID, 101 | path: { 102 | '19': 'img/tracking-protection-disabled-16.png', 103 | '38': 'img/tracking-protection-disabled-32.png' 104 | } 105 | }) 106 | browser.pageAction.show(requestTabID) 107 | allowedRequests[requestTabID].push(requestTopHost) 108 | /* 109 | if (allowedEntities[requestTabID].indexOf(requestEntity.entityName) === -1) { 110 | allowedEntities[requestTabID].push(requestEntity.entityName) 111 | } 112 | */ 113 | log('Allowing request from origin for which Blok is disabled.') 114 | return allowRequest() 115 | } 116 | 117 | if (requestDetails.type === 'main_frame') { 118 | log('Allowing clicks to links.') 119 | return allowRequest() 120 | } 121 | 122 | flags.requestHostInBlocklist = hostInBlocklist(blocklist, requestTopHost) 123 | 124 | if (!flags.requestHostInBlocklist) { 125 | log('Allowing request to domain NOT in the block-list.') 126 | return allowRequest() 127 | } 128 | 129 | requestEntity = getRequestEntity(entityList, originTopHost, requestTopHost, originTopHost) 130 | if (requestEntity.sameEntity) { 131 | log('Allowing request to block-list domain that belongs to same entity as origin domain.') 132 | return allowRequest() 133 | } 134 | 135 | flags.requestIsThirdParty = requestTopHost !== originTopHost 136 | 137 | if (flags.requestIsThirdParty) { 138 | flags.requestHostMatchesMainFrame = (requestDetails.frameId > 0 && requestTopHost === mainFrameOriginTopHosts[requestTabID]) 139 | if (flags.requestHostMatchesMainFrame) { 140 | log('Allowing request to block-list domain that matches the top/main frame domain.') 141 | return allowRequest() 142 | } 143 | 144 | log('Blocking request: originTopHost: ', originTopHost, ' mainFrameOriginTopHost: ', mainFrameOriginTopHosts[requestTabID], ' requestTopHost: ', requestTopHost, ' requestHostInBlocklist: ', flags.requestHostInBlocklist) 145 | blockedRequests[requestTabID].push(requestTopHost) 146 | if (blockedEntities[requestTabID].indexOf(requestEntity.entityName) === -1) { 147 | blockedEntities[requestTabID].push(requestEntity.entityName) 148 | } 149 | totalExecTime[requestTabID] += Date.now() - blockTrackerRequestsStart 150 | browser.pageAction.show(requestTabID) 151 | return {cancel: true} 152 | } 153 | 154 | log('Default to allowing request.') 155 | return allowRequest() 156 | } 157 | } 158 | 159 | function startRequestListener (blocklist, allowedHosts, entityList) { 160 | browser.webRequest.onBeforeRequest.addListener( 161 | blockTrackerRequests(blocklist, allowedHosts, entityList), 162 | {urls: ['*://*/*']}, 163 | ['blocking'] 164 | ) 165 | } 166 | 167 | function startWindowAndTabListeners (allowedHosts, reportedHosts) { 168 | browser.windows.onFocusChanged.addListener((windowID) => { 169 | browser.windows.get(windowID, {}, (focusedWindow) => { 170 | if (focusedWindow.incognito) { 171 | privateBrowsingMode = true 172 | } else { 173 | privateBrowsingMode = false 174 | } 175 | }) 176 | log('browser.windows.onFocusChanged, windowID: ' + windowID) 177 | browser.tabs.query({active: true, windowId: windowID}, (tabsArray) => { 178 | let tab = tabsArray[0] 179 | currentActiveTabID = tab.id 180 | let tabTopHost = canonicalizeHost(new URL(tab.url).host) 181 | mainFrameOriginDisabledIndex = allowedHosts.indexOf(tabTopHost) 182 | setWindowFrameVarsForPopup(tabTopHost, allowedHosts, reportedHosts) 183 | }) 184 | }) 185 | 186 | browser.tabs.onActivated.addListener(function (activeInfo) { 187 | currentActiveTabID = activeInfo.tabId 188 | browser.tabs.get(currentActiveTabID, function (tab) { 189 | let tabTopHost = canonicalizeHost(new URL(tab.url).host) 190 | mainFrameOriginDisabledIndex = allowedHosts.indexOf(tabTopHost) 191 | setWindowFrameVarsForPopup(tabTopHost, allowedHosts, reportedHosts) 192 | }) 193 | }) 194 | 195 | browser.tabs.onUpdated.addListener(function (tabID, changeInfo) { 196 | if (changeInfo.status === 'loading') { 197 | restartBlokForTab(tabID) 198 | browser.tabs.get(currentActiveTabID, function (tab) { 199 | let tabTopHost = canonicalizeHost(new URL(tab.url).host) 200 | setWindowFrameVarsForPopup(tabTopHost, allowedHosts, reportedHosts) 201 | }) 202 | } else if (changeInfo.status === 'complete') { 203 | log('******** tab changeInfo.status complete ********') 204 | if (blockedRequests[tabID]) { 205 | log('blocked ' + blockedRequests[tabID].length + ' requests: ', blockedRequests[tabID]) 206 | log('from ' + blockedEntities[tabID].length + ' entities: ', blockedEntities[tabID]) 207 | } 208 | if (allowedRequests[tabID]) { 209 | log('allowed ' + allowedRequests[tabID].length + ' requests: ', allowedRequests[tabID]) 210 | log('from ' + allowedEntities[tabID].length + ' entities: ', allowedEntities[tabID]) 211 | } 212 | log('totalExecTime: ' + totalExecTime[tabID]) 213 | log('******** tab changeInfo.status complete ********') 214 | } 215 | }) 216 | } 217 | 218 | function startMessageListener (allowedHosts, reportedHosts, testPilotPingChannel) { 219 | browser.runtime.onMessage.addListener(function (message) { 220 | if (message === 'disable') { 221 | let mainFrameOriginTopHost = mainFrameOriginTopHosts[currentActiveTabID] 222 | let testPilotPingMessage = { 223 | originDomain: mainFrameOriginTopHost, 224 | trackerDomains: blockedRequests[currentActiveTabID], 225 | event: 'blok-disabled', 226 | breakage: '', 227 | notes: '' 228 | } 229 | log('telemetry ping payload: ' + JSON.stringify(testPilotPingMessage)) 230 | testPilotPingChannel.postMessage(testPilotPingMessage) 231 | browser.pageAction.setIcon({ 232 | tabId: currentActiveTabID, 233 | path: { 234 | '19': 'img/tracking-protection-disabled-16.png', 235 | '38': 'img/tracking-protection-disabled-32.png' 236 | } 237 | }) 238 | allowedHosts.push(mainFrameOriginTopHost) 239 | browser.storage.local.set({allowedHosts: allowedHosts}) 240 | browser.tabs.reload(currentActiveTabID) 241 | } 242 | if (message === 're-enable') { 243 | let mainFrameOriginTopHost = mainFrameOriginTopHosts[currentActiveTabID] 244 | let testPilotPingMessage = { 245 | originDomain: mainFrameOriginTopHost, 246 | trackerDomains: blockedRequests[currentActiveTabID], 247 | event: 'blok-enabled', 248 | breakage: '', 249 | notes: '' 250 | } 251 | log('telemetry ping payload: ' + JSON.stringify(testPilotPingMessage)) 252 | testPilotPingChannel.postMessage(testPilotPingMessage) 253 | browser.pageAction.setIcon({ 254 | tabId: currentActiveTabID, 255 | path: { 256 | '19': 'img/tracking-protection-16.png', 257 | '38': 'img/tracking-protection-32.png' 258 | } 259 | }) 260 | allowedHosts.splice(mainFrameOriginDisabledIndex, 1) 261 | browser.storage.local.set({allowedHosts: allowedHosts}) 262 | browser.tabs.reload(currentActiveTabID) 263 | } 264 | if (message.hasOwnProperty('feedback')) { 265 | let testPilotPingMessage = { 266 | originDomain: mainFrameOriginTopHosts[currentActiveTabID], 267 | trackerDomains: blockedRequests[currentActiveTabID], 268 | event: message.feedback, 269 | breakage: '', 270 | notes: '' 271 | } 272 | log('telemetry ping payload: ' + JSON.stringify(testPilotPingMessage)) 273 | testPilotPingChannel.postMessage(testPilotPingMessage) 274 | reportedHosts[mainFrameOriginTopHosts[currentActiveTabID]] = message 275 | browser.storage.local.set({reportedHosts: reportedHosts}) 276 | setWindowFrameVarsForPopup(currentActiveOrigin, allowedHosts, reportedHosts) 277 | } 278 | if (message.hasOwnProperty('breakage')) { 279 | let testPilotPingMessage = { 280 | originDomain: mainFrameOriginTopHosts[currentActiveTabID], 281 | trackerDomains: blockedRequests[currentActiveTabID], 282 | event: 'submit', 283 | breakage: message.breakage, 284 | notes: message.notes 285 | } 286 | log('telemetry ping payload: ' + JSON.stringify(testPilotPingMessage)) 287 | testPilotPingChannel.postMessage(testPilotPingMessage) 288 | } 289 | }) 290 | } 291 | 292 | function startListeners ({blocklist, allowedHosts, entityList, reportedHosts}, testPilotPingChannel) { 293 | startRequestListener(blocklist, allowedHosts, entityList) 294 | 295 | startWindowAndTabListeners(allowedHosts, reportedHosts) 296 | 297 | startMessageListener(allowedHosts, reportedHosts, testPilotPingChannel) 298 | } 299 | 300 | const state = { 301 | blocklist: new Map(), 302 | allowedHosts: [], 303 | reportedHosts: {}, 304 | entityList: {} 305 | } 306 | 307 | function initTestPilotPingChannel ({BroadcastChannel}) { 308 | let TESTPILOT_TELEMETRY_CHANNEL = 'testpilot-telemetry' 309 | let testPilotPingChannel = new BroadcastChannel(TESTPILOT_TELEMETRY_CHANNEL) 310 | return testPilotPingChannel 311 | } 312 | 313 | loadLists(state).then(() => { 314 | let testPilotPingChannel = initTestPilotPingChannel(window) 315 | startListeners(state, testPilotPingChannel) 316 | }, console.error.bind(console)) 317 | -------------------------------------------------------------------------------- /src/js/canonicalize.js: -------------------------------------------------------------------------------- 1 | var ip4DecimalPattern = '^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?).){3}(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?))$' 2 | var ip4HexPattern = '^(?:(?:0x[0-9a-f]{1,2}).){3}(?:0x[0-9a-f]{1,2})$' 3 | var ip4OctalPattern = '^(?:(?:03[1-7][0-7]|0[12][0-7]{1,2}|[0-7]{1,2}).){3}(?:03[1-7][0-7]|0[12][0-7]{1,2}|[0-7]{1,2})$' 4 | 5 | // like trim() helper from underscore.string: 6 | // trims chars from beginning and end of str 7 | function trim (str, chars) { 8 | // escape any regexp chars 9 | chars = chars.replace(/([.*+?^=!:${}()|[\]\/\\])/g, '\\$1') 10 | return str.replace(new RegExp('^' + chars + '+|' + chars + '+$', 'g'), '') 11 | } 12 | 13 | // https://developers.google.com/safe-browsing/v4/urls-hashing#canonicalization 14 | function canonicalizeHost (host) { 15 | // Remove all leading and trailing dots 16 | var canonicalizedHost = trim(host, '.') 17 | 18 | // Replace consecutive dots with a single dot 19 | canonicalizedHost = canonicalizedHost.replace(new RegExp('[.]+', 'g'), '.') 20 | 21 | // If the hostname can be parsed as an IP address, 22 | // normalize it to 4 dot-separated decimal values. 23 | // The client should handle any legal IP-address encoding, 24 | // including octal, hex, and TODO: fewer than four components 25 | var base = 10 26 | var isIP4Decimal, isIP4Hex, isIP4Octal 27 | 28 | isIP4Decimal = canonicalizedHost.match(ip4DecimalPattern) != null 29 | isIP4Hex = canonicalizedHost.match(ip4HexPattern) != null 30 | isIP4Octal = canonicalizedHost.match(ip4OctalPattern) != null 31 | if (isIP4Decimal || isIP4Hex || isIP4Octal) { 32 | if (isIP4Hex) { 33 | base = 16 34 | } else if (isIP4Octal) { 35 | base = 8 36 | } 37 | canonicalizedHost = canonicalizedHost.split('.').map(num => parseInt(num, base)).join('.') 38 | } 39 | 40 | // Lowercase the whole string 41 | canonicalizedHost = canonicalizedHost.toLowerCase() 42 | return canonicalizedHost 43 | } 44 | 45 | module.exports = { 46 | canonicalizeHost, 47 | trim 48 | } 49 | -------------------------------------------------------------------------------- /src/js/lists.js: -------------------------------------------------------------------------------- 1 | function allHosts (host) { 2 | const allHosts = [] 3 | const hostParts = host.split('.') 4 | while (hostParts.length > 1) { 5 | allHosts.push(hostParts.join('.')) 6 | hostParts.splice(0, 1) 7 | } 8 | return allHosts 9 | } 10 | 11 | function loadLists (state) { 12 | const blockListPromise = loadJSON('js/disconnect-blocklist.json').then((data) => { 13 | state.blocklist = processBlockListJSON(data) 14 | }) 15 | 16 | const entityListPromise = loadJSON('js/disconnect-entitylist.json').then((data) => { 17 | state.entityList = data 18 | }) 19 | 20 | const allowedHostsPromise = getAllowedHostsList().then((allowedHosts) => { 21 | state.allowedHosts = allowedHosts 22 | }) 23 | 24 | const reportedHostsPromise = getReportedHostsList().then((reportedHosts) => { 25 | state.reportedHosts = reportedHosts 26 | }) 27 | 28 | return Promise.all([blockListPromise, entityListPromise, allowedHostsPromise, reportedHostsPromise]) 29 | } 30 | 31 | function loadJSON (url) { 32 | return fetch(url) 33 | .then((res) => res.json()) 34 | } 35 | 36 | function processBlockListJSON (data) { 37 | const blocklist = new Map() 38 | 39 | // remove un-needed categories per disconnect 40 | delete data.categories['Content'] 41 | delete data.categories['Legacy Disconnect'] 42 | delete data.categories['Legacy Content'] 43 | 44 | // parse thru the disconnect blocklist and create 45 | // local blocklist "grouped" by main domain. I.e., 46 | // blocklist["facebook.com"] = http://www.facebook.com 47 | // blocklist["fb.com"] = http://www.facebook.com 48 | // blocklist["doubleclick.net"] = http://www.google.com 49 | // blocklist["google-analytics.com"] = http://www.google.com 50 | // etc. 51 | for (let categoryName in data.categories) { 52 | var category = data.categories[categoryName] 53 | var entityCount = category.length 54 | 55 | for (var i = 0; i < entityCount; i++) { 56 | var entity = category[i] 57 | 58 | for (let entityName in entity) { 59 | var urls = entity[entityName] 60 | 61 | for (let mainDomain in urls) { 62 | blocklist.set(mainDomain, []) 63 | var domains = urls[mainDomain] 64 | var domainsCount = domains.length 65 | 66 | for (let j = 0; j < domainsCount; j++) { 67 | blocklist.set(domains[j], mainDomain) 68 | } 69 | } 70 | } 71 | } 72 | } 73 | 74 | return blocklist 75 | } 76 | 77 | function getAllowedHostsList () { 78 | return browser.storage.local.get('allowedHosts').then((item) => { 79 | if (item.allowedHosts) { 80 | return item.allowedHosts 81 | } 82 | return [] 83 | }) 84 | } 85 | 86 | function getReportedHostsList () { 87 | return browser.storage.local.get('reportedHosts').then((item) => { 88 | if (item.reportedHosts) { 89 | return item.reportedHosts 90 | } 91 | return {} 92 | }) 93 | } 94 | 95 | // check if any host from lowest-level to top-level is in the blocklist 96 | function hostInBlocklist (blocklist, host) { 97 | let requestHostInBlocklist = false 98 | var allHostVariants = allHosts(host) 99 | for (let hostVariant of allHostVariants) { 100 | requestHostInBlocklist = blocklist.has(hostVariant) 101 | if (requestHostInBlocklist) { 102 | return true 103 | } 104 | } 105 | return false 106 | } 107 | 108 | // check if any host from lowest-level to top-level is in the entitylist 109 | function hostInEntity (entityHosts, host) { 110 | let entityHost = false 111 | for (let hostVariant of allHosts(host)) { 112 | entityHost = entityHosts.indexOf(hostVariant) > -1 113 | if (entityHost) { 114 | return true 115 | } 116 | } 117 | return false 118 | } 119 | 120 | module.exports = { 121 | allHosts, 122 | loadLists, 123 | processBlockListJSON, 124 | hostInBlocklist, 125 | hostInEntity 126 | } 127 | -------------------------------------------------------------------------------- /src/js/log.js: -------------------------------------------------------------------------------- 1 | if (process.env.MODE === 'production') { 2 | exports.log = function noop () {} 3 | } else { 4 | exports.log = console.log.bind(console) 5 | } 6 | -------------------------------------------------------------------------------- /src/js/popup.js: -------------------------------------------------------------------------------- 1 | let disabled = false 2 | let days = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'] 3 | let months = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'] 4 | 5 | let breakageChecked = null 6 | 7 | function show (querySelector) { 8 | for (let element of document.querySelectorAll(querySelector)) { 9 | element.classList.remove('hide') 10 | } 11 | } 12 | 13 | function hide (querySelector) { 14 | for (let element of document.querySelectorAll(querySelector)) { 15 | element.classList.add('hide') 16 | } 17 | } 18 | 19 | function showFeedbackPanel () { 20 | hide('#main-panel') 21 | show('#feedback-panel') 22 | hide('#breakage-notes-panel') 23 | } 24 | 25 | function showBreakageNotesPanel () { 26 | hide('#main-panel') 27 | hide('#feedback-panel') 28 | show('#breakage-notes-panel') 29 | } 30 | 31 | // grabbed from http://stackoverflow.com/questions/13203518/javascript-date-suffix-formatting 32 | // for clean date formatting 33 | // TODO: find an alternate solution if we ever L10N 34 | function ordinal (date) { 35 | if (date > 20 || date < 10) { 36 | switch (date % 10) { 37 | case 1: 38 | return 'st' 39 | case 2: 40 | return 'nd' 41 | case 3: 42 | return 'rd' 43 | } 44 | } 45 | return 'th' 46 | } 47 | 48 | function showHostReport (hostReport) { 49 | let date = new Date(hostReport.dateTime) 50 | let hostReportDateTimeString = days[date.getDay()] + ', ' + months[date.getMonth()] + ' ' + date.getDate() + ordinal(date.getDate()) 51 | let hostReportType = '.' + hostReport.feedback + '-host-report' 52 | document.querySelector(hostReportType + ' .host-report-date').innerText = ' ' + hostReportDateTimeString 53 | hide('.host-report') 54 | show(hostReportType) 55 | show('.host-report-row') 56 | } 57 | 58 | function setDisabledUI () { 59 | hide('.blocking') 60 | show('.disabled') 61 | document.querySelector('#enabledSwitch').removeAttribute('checked') 62 | } 63 | 64 | function setEnabledUI () { 65 | hide('.disabled') 66 | show('.blocking') 67 | document.querySelector('#enabledSwitch').setAttribute('checked', true) 68 | } 69 | 70 | function updateFromBackgroundPage (bgPage) { 71 | disabled = bgPage.topFrameHostDisabled 72 | if (disabled) { 73 | setDisabledUI() 74 | } else { 75 | setEnabledUI() 76 | } 77 | let hostReport = bgPage.topFrameHostReport 78 | if (hostReport.hasOwnProperty('feedback')) { 79 | showHostReport(hostReport) 80 | } 81 | } 82 | 83 | document.querySelector('#toggle-blok').addEventListener('click', () => { 84 | if (disabled) { 85 | browser.runtime.sendMessage('re-enable') 86 | } else { 87 | browser.runtime.sendMessage('disable') 88 | } 89 | // timeout set so animation completes prior to close 90 | setTimeout(() => { 91 | window.close() 92 | }, 500) 93 | }) 94 | 95 | for (let feedbackBtn of document.querySelectorAll('.feedback-btn')) { 96 | feedbackBtn.addEventListener('click', function (event) { 97 | let feedback = event.target.dataset.feedback 98 | let hostReport = { 99 | 'feedback': feedback, 100 | 'dateTime': Date.now() 101 | } 102 | showHostReport(hostReport) 103 | browser.runtime.sendMessage(hostReport) 104 | if (feedback === 'page-problem') { 105 | showFeedbackPanel() 106 | } else { 107 | window.close() 108 | } 109 | }) 110 | } 111 | 112 | for (let submitBtn of document.querySelectorAll('.submit-btn')) { 113 | submitBtn.addEventListener('click', function (ev) { 114 | if (ev.target.id === 'submit-breakage-btn') { 115 | breakageChecked = document.querySelector('input.breakage:checked') 116 | if (breakageChecked !== null) { 117 | let message = { 118 | 'breakage': breakageChecked.value, 119 | 'notes': document.querySelector('textarea#notes').value 120 | } 121 | browser.runtime.sendMessage(message) 122 | showBreakageNotesPanel() 123 | } else { 124 | document.querySelector('#breakage-required').className = '' 125 | } 126 | } else if (ev.target.id === 'submit-notes-btn') { 127 | let notes = document.querySelector('textarea#notes').value 128 | if (notes !== null) { 129 | let message = { 130 | 'breakage': breakageChecked.value, 131 | 'notes': notes 132 | } 133 | browser.runtime.sendMessage(message) 134 | } 135 | window.close() 136 | } 137 | }) 138 | } 139 | 140 | browser.runtime.getBackgroundPage(updateFromBackgroundPage) 141 | -------------------------------------------------------------------------------- /src/js/requests.js: -------------------------------------------------------------------------------- 1 | const {log} = require('./log') 2 | const {hostInEntity} = require('./lists') 3 | 4 | let hostEntityCache = {} 5 | 6 | function requestAllower (tabID, totalExecTime, startDateTime) { 7 | totalExecTime[tabID] += Date.now() - startDateTime 8 | return {} 9 | } 10 | 11 | function getRequestEntity (entityList, originTopHost, requestTopHost, mainFrameOriginTopHost) { 12 | let requestEntity = {'entityName': null, 'sameEntity': false} 13 | 14 | // First, try to return everything from memo-ized cache 15 | let requestEntityName = hostEntityCache[requestTopHost] 16 | let originEntityName = hostEntityCache[originTopHost] 17 | let mainFrameOriginEntityName = hostEntityCache[mainFrameOriginTopHost] 18 | requestEntity.sameEntity = ( 19 | requestEntityName && ( 20 | requestEntityName === originEntityName || requestEntityName === mainFrameOriginEntityName 21 | ) 22 | ) 23 | if (requestEntity.sameEntity) { 24 | requestEntity.entityName = requestEntityName 25 | log('returning from memo-ized cache: ', requestEntity) 26 | return requestEntity 27 | } 28 | 29 | // If a host was not found in the memo-ized cache, check thru the entityList 30 | for (let entityName in entityList) { 31 | let entity = entityList[entityName] 32 | let requestIsEntityResource = false 33 | let originIsEntityProperty = false 34 | let mainFrameOriginIsEntityProperty = false 35 | 36 | requestIsEntityResource = hostInEntity(entity.resources, requestTopHost) 37 | if (requestIsEntityResource) { 38 | requestEntity.entityName = entityName 39 | hostEntityCache[requestTopHost] = entityName 40 | } 41 | 42 | originIsEntityProperty = hostInEntity(entity.properties, originTopHost) 43 | if (originIsEntityProperty) { 44 | hostEntityCache[originTopHost] = entityName 45 | } 46 | 47 | mainFrameOriginIsEntityProperty = hostInEntity(entity.properties, mainFrameOriginTopHost) 48 | if (mainFrameOriginIsEntityProperty) { 49 | hostEntityCache[mainFrameOriginTopHost] = entityName 50 | } 51 | 52 | if ((originIsEntityProperty || mainFrameOriginIsEntityProperty) && requestIsEntityResource) { 53 | log(`originTopHost ${originTopHost} and resource requestTopHost ${requestTopHost} belong to the same entity: ${entityName}; allowing request`) 54 | requestEntity.sameEntity = true 55 | break 56 | } 57 | } 58 | // TODO: https://github.com/mozilla/blok/issues/110 59 | return requestEntity 60 | } 61 | 62 | module.exports = { 63 | requestAllower, 64 | getRequestEntity 65 | } 66 | -------------------------------------------------------------------------------- /src/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "manifest_version": 2, 3 | "name": "Tracking Protection Experiment", 4 | "version": "1.1", 5 | 6 | "description": "Implements tracking protection as a web extension add-on.", 7 | "icons": { 8 | "48": "img/blok-48.png", 9 | "96": "img/blok-96.png" 10 | }, 11 | 12 | "applications": { 13 | "gecko": { 14 | "id": "blok@mozilla.org", 15 | "strict_min_version": "48.0", 16 | "update_url": "https://testpilot.firefox.com/files/blok/updates.json" 17 | } 18 | }, 19 | 20 | "background": { 21 | "scripts": ["js/background.bundle.js"] 22 | }, 23 | 24 | "homepage_url": "https://testpilot.firefox.com/", 25 | 26 | "page_action": { 27 | "default_icon": { 28 | "19": "img/tracking-protection-16.png", 29 | "38": "img/tracking-protection-32.png" 30 | }, 31 | "default_title": "Tracking Protection", 32 | "default_popup": "html/popup.html", 33 | "browser_style": false 34 | }, 35 | 36 | "permissions": [ 37 | "storage", 38 | "webRequest", 39 | "webRequestBlocking", 40 | "tabs", 41 | "" 42 | ] 43 | 44 | } 45 | -------------------------------------------------------------------------------- /tests/blocklist-fixture.json: -------------------------------------------------------------------------------- 1 | { 2 | "categories": { 3 | "Disconnect": [ 4 | { 5 | "ItIsATracker": { 6 | "https://itisatracker.com/": [ 7 | "itisatracker.com", 8 | "trackertest.org" 9 | ] 10 | } 11 | } 12 | ], 13 | "Content": [ 14 | { 15 | "Akamai": { 16 | "http://www.akamai.com/": [ 17 | "abmr.net", 18 | "akamai.com", 19 | "edgesuite.net" 20 | ] 21 | } 22 | } 23 | ], 24 | "Legacy Disconnect": [ 25 | { 26 | "Google": { 27 | "http://www.google.com/": [ 28 | "2mdn.net" 29 | ] 30 | } 31 | } 32 | ], 33 | "Legacy Content": [ 34 | { 35 | "Yahoo": { 36 | "http://www.yahoo.com/": [ 37 | "flickr.com" 38 | ] 39 | } 40 | } 41 | ] 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /tests/entitylist-fixture.json: -------------------------------------------------------------------------------- 1 | { 2 | "Facebook": { 3 | "properties": [ 4 | "facebook.com", 5 | "facebook.de", 6 | "facebook.fr", 7 | "facebook.net", 8 | "fb.com", 9 | "fb.me", 10 | "friendfeed.com", 11 | "instagram.com", 12 | "fbcdn.net", 13 | "messenger.com" 14 | ], 15 | "resources": [ 16 | "facebook.com", 17 | "facebook.de", 18 | "facebook.fr", 19 | "facebook.net", 20 | "fb.com", 21 | "fb.me", 22 | "friendfeed.com", 23 | "akamaihd.net", 24 | "instagram.com", 25 | "fbcdn.net", 26 | "messenger.com" 27 | ] 28 | }, 29 | "Google": { 30 | "properties": [ 31 | "abc.xyz", 32 | "google.com", 33 | "ingress.com", 34 | "admeld.com", 35 | "blogger.com", 36 | "google-melange.com", 37 | "google.ad", 38 | "google.ae", 39 | "google.com.af", 40 | "google.com.ag", 41 | "google.com.ai", 42 | "google.al", 43 | "google.am", 44 | "google.co.ao", 45 | "google.com.ar", 46 | "google.as", 47 | "google.at", 48 | "google.com.au", 49 | "google.az", 50 | "google.ba", 51 | "google.com.bd", 52 | "google.be", 53 | "google.bf", 54 | "google.bg", 55 | "google.com.bh", 56 | "google.bi", 57 | "google.bj", 58 | "google.com.bn", 59 | "google.com.bo", 60 | "google.com.br", 61 | "google.bs", 62 | "google.bt", 63 | "google.co.bw", 64 | "google.by", 65 | "google.com.bz", 66 | "google.ca", 67 | "google.cd", 68 | "google.cf", 69 | "google.cg", 70 | "google.ch", 71 | "google.ci", 72 | "google.co.ck", 73 | "google.cl", 74 | "google.cm", 75 | "google.cn", 76 | "google.com.co", 77 | "google.co.cr", 78 | "google.com.cu", 79 | "google.cv", 80 | "google.com.cy", 81 | "google.cz", 82 | "google.de", 83 | "google.dj", 84 | "google.dk", 85 | "google.dm", 86 | "google.com.do", 87 | "google.dz", 88 | "google.com.ec", 89 | "google.ee", 90 | "google.com.eg", 91 | "google.es", 92 | "google.com.et", 93 | "google.fi", 94 | "google.com.fj", 95 | "google.fm", 96 | "google.fr", 97 | "google.ga", 98 | "google.ge", 99 | "google.gg", 100 | "google.com.gh", 101 | "google.com.gi", 102 | "google.gl", 103 | "google.gm", 104 | "google.gp", 105 | "google.gr", 106 | "google.com.gt", 107 | "google.gy", 108 | "google.com.hk", 109 | "google.hn", 110 | "google.hr", 111 | "google.ht", 112 | "google.hu", 113 | "google.co.id", 114 | "google.ie", 115 | "google.co.il", 116 | "google.im", 117 | "google.co.in", 118 | "google.iq", 119 | "google.is", 120 | "google.it", 121 | "google.je", 122 | "google.com.jm", 123 | "google.jo", 124 | "google.co.jp", 125 | "google.co.ke", 126 | "google.com.kh", 127 | "google.ki", 128 | "google.kg", 129 | "google.co.kr", 130 | "google.com.kw", 131 | "google.kz", 132 | "google.la", 133 | "google.com.lb", 134 | "google.li", 135 | "google.lk", 136 | "google.co.ls", 137 | "google.lt", 138 | "google.lu", 139 | "google.lv", 140 | "google.com.ly", 141 | "google.co.ma", 142 | "google.md", 143 | "google.me", 144 | "google.mg", 145 | "google.mk", 146 | "google.ml", 147 | "google.com.mm", 148 | "google.mn", 149 | "google.ms", 150 | "google.com.mt", 151 | "google.mu", 152 | "google.mv", 153 | "google.mw", 154 | "google.com.mx", 155 | "google.com.my", 156 | "google.co.mz", 157 | "google.com.na", 158 | "google.com.nf", 159 | "google.com.ng", 160 | "google.com.ni", 161 | "google.ne", 162 | "google.nl", 163 | "google.no", 164 | "google.com.np", 165 | "google.nr", 166 | "google.nu", 167 | "google.co.nz", 168 | "google.com.om", 169 | "google.com.pa", 170 | "google.com.pe", 171 | "google.com.pg", 172 | "google.com.ph", 173 | "google.com.pk", 174 | "google.pl", 175 | "google.pn", 176 | "google.com.pr", 177 | "google.ps", 178 | "google.pt", 179 | "google.com.py", 180 | "google.com.qa", 181 | "google.ro", 182 | "google.ru", 183 | "google.rw", 184 | "google.com.sa", 185 | "google.com.sb", 186 | "google.sc", 187 | "google.se", 188 | "google.com.sg", 189 | "google.sh", 190 | "google.si", 191 | "google.sk", 192 | "google.com.sl", 193 | "google.sn", 194 | "google.so", 195 | "google.sm", 196 | "google.st", 197 | "google.com.sv", 198 | "google.td", 199 | "google.tg", 200 | "google.co.th", 201 | "google.com.tj", 202 | "google.tk", 203 | "google.tl", 204 | "google.tm", 205 | "google.tn", 206 | "google.to", 207 | "google.com.tr", 208 | "google.tt", 209 | "google.com.tw", 210 | "google.co.tz", 211 | "google.com.ua", 212 | "google.co.ug", 213 | "google.co.uk", 214 | "google.com.uy", 215 | "google.co.uz", 216 | "google.com.vc", 217 | "google.co.ve", 218 | "google.vg", 219 | "google.co.vi", 220 | "google.com.vn", 221 | "google.vu", 222 | "google.ws", 223 | "google.rs", 224 | "google.co.za", 225 | "google.co.zm", 226 | "google.co.zw", 227 | "google.cat", 228 | "panoramio.com", 229 | "youtube.com" 230 | ], 231 | "resources": [ 232 | "google.com", 233 | "2mdn.net", 234 | "admeld.com", 235 | "admob.com", 236 | "cc-dt.com", 237 | "destinationurl.com", 238 | "doubleclick.net", 239 | "gmail.com", 240 | "google-analytics.com", 241 | "googleadservices.com", 242 | "googlemail.com", 243 | "googlesyndication.com", 244 | "googlevideo.com", 245 | "googletagservices.com", 246 | "invitemedia.com", 247 | "postrank.com", 248 | "smtad.net", 249 | "apture.com", 250 | "blogger.com", 251 | "ggpht.com", 252 | "gmodules.com", 253 | "googleapis.com", 254 | "googleusercontent.com", 255 | "gstatic.com", 256 | "recaptcha.net", 257 | "youtube.com" 258 | ] 259 | }, 260 | "Twitter": { 261 | "properties": [ 262 | "twitter.com", 263 | "backtype.com", 264 | "crashlytics.com", 265 | "tweetdeck.com", 266 | "twimg.com", 267 | "twitter.jp", 268 | "digits.com", 269 | "fabric.io" 270 | ], 271 | "resources": [ 272 | "twitter.com", 273 | "backtype.com", 274 | "crashlytics.com", 275 | "tweetdeck.com", 276 | "twimg.com", 277 | "twitter.jp", 278 | "fabric.io" 279 | ] 280 | } 281 | } 282 | -------------------------------------------------------------------------------- /tests/test-canonicalize.js: -------------------------------------------------------------------------------- 1 | var test = require('tape') 2 | var {canonicalizeHost} = require('../src/js/canonicalize') 3 | 4 | test('canonicalizeHost plain host is plain', function (t) { 5 | t.plan(1) 6 | t.equal(canonicalizeHost('trackertest.org'), 'trackertest.org') 7 | }) 8 | 9 | test('canonicalizeHost leading and trailing dots are trimmed', function (t) { 10 | t.plan(3) 11 | t.equal(canonicalizeHost('.trackertest.org'), 'trackertest.org') 12 | t.equal(canonicalizeHost('trackertest.org.'), 'trackertest.org') 13 | t.equal(canonicalizeHost('.trackertest.org.'), 'trackertest.org') 14 | }) 15 | 16 | test('canonicalizeHost consecutive dots are consolidated', function (t) { 17 | t.plan(2) 18 | t.equal(canonicalizeHost('trackertest..org'), 'trackertest.org') 19 | t.equal(canonicalizeHost('track..trackertest..org'), 'track.trackertest.org') 20 | }) 21 | 22 | test('canonicalizeHost ip4 addresses decimal, hex, and octal', function (t) { 23 | // OpenDNS as test addresses 24 | t.plan(3) 25 | // plain decimal 26 | t.equal(canonicalizeHost('208.67.222.222'), '208.67.222.222') 27 | // hex 28 | t.equal(canonicalizeHost('0xd0.0x43.0xde.0xde'), '208.67.222.222') 29 | // octal 30 | t.equal(canonicalizeHost('0320.0103.0336.0336'), '208.67.222.222') 31 | }) 32 | 33 | test('canonicalizeHost lowercase everything', function (t) { 34 | t.plan(2) 35 | t.equal(canonicalizeHost('TrackerTest.Org'), 'trackertest.org') 36 | t.equal(canonicalizeHost('TRACKERTEST.ORG'), 'trackertest.org') 37 | }) 38 | 39 | test('canonicalizeHost test everything together', function (t) { 40 | t.plan(1) 41 | t.equal(canonicalizeHost('..TRACK..TrackerTest.Org.'), 'track.trackertest.org') 42 | }) 43 | -------------------------------------------------------------------------------- /tests/test-lists.js: -------------------------------------------------------------------------------- 1 | var test = require('tape') 2 | var {allHosts, processBlockListJSON, hostInBlocklist, hostInEntity} = require('../src/js/lists') 3 | 4 | var blockListFixtureData = require('./blocklist-fixture.json') 5 | var entityListFixtureData = require('./entitylist-fixture.json') 6 | 7 | test('processBlockListJSON returns Map', (t) => { 8 | t.plan(2) 9 | let processedBlocklist = processBlockListJSON(blockListFixtureData) 10 | t.ok(processedBlocklist instanceof Map, 'got an instance of Map') 11 | t.equal(processedBlocklist.size, 3, 'got Map with expected 3 keys') 12 | }) 13 | 14 | test('processBlockListJSON removes content and legacy', (t) => { 15 | t.plan(4) 16 | let processedBlocklist = processBlockListJSON(blockListFixtureData) 17 | 18 | t.ok(processedBlocklist.has('itisatracker.com'), 'kept Disconnect category') 19 | t.notOk(processedBlocklist.has('akamai.com'), 'dropped Content category') 20 | t.notOk(processedBlocklist.has('2mdn.net'), 'dropped Legacy Disconnect category') 21 | t.notOk(processedBlocklist.has('flickr.com'), 'dropped Legacy Content category') 22 | }) 23 | 24 | test('processBlockListJSON adds main domain and individual domains', (t) => { 25 | t.plan(3) 26 | let processedBlocklist = processBlockListJSON(blockListFixtureData) 27 | 28 | t.ok(processedBlocklist.has('https://itisatracker.com/'), 'added main domain') 29 | t.ok(processedBlocklist.has('itisatracker.com'), 'added alternative domain') 30 | t.ok(processedBlocklist.has('trackertest.org'), 'added alternative domain') 31 | }) 32 | 33 | test('allHosts returns single element for trackertest.org', function (t) { 34 | t.plan(1) 35 | t.deepEqual(allHosts('trackertest.org'), ['trackertest.org']) 36 | }) 37 | 38 | test('allHosts returns multiple elements for tracky.track.trackertest.org', function (t) { 39 | t.plan(1) 40 | t.deepEqual( 41 | allHosts('tracky.track.trackertest.org'), 42 | [ 43 | 'tracky.track.trackertest.org', 44 | 'track.trackertest.org', 45 | 'trackertest.org' 46 | ] 47 | ) 48 | }) 49 | 50 | test('hostInBlocklist returns true for plain itisatracker.com', function (t) { 51 | t.plan(1) 52 | let processedFixtureBlocklist = processBlockListJSON(blockListFixtureData) 53 | t.ok(hostInBlocklist(processedFixtureBlocklist, 'itisatracker.com')) 54 | }) 55 | 56 | test('hostInBlocklist returns true for tracky.itisatracker.com', function (t) { 57 | t.plan(1) 58 | let processedFixtureBlocklist = processBlockListJSON(blockListFixtureData) 59 | t.ok(hostInBlocklist(processedFixtureBlocklist, 'tracky.itisatracker.com')) 60 | }) 61 | 62 | test('hostInBlocklist returns false for plain itisacdn.com', function (t) { 63 | t.plan(1) 64 | let processedFixtureBlocklist = processBlockListJSON(blockListFixtureData) 65 | t.notOk(hostInBlocklist(processedFixtureBlocklist, 'itisacdn.com')) 66 | }) 67 | 68 | test('hostInBlocklist returns false for plain region.itisacdn.com', function (t) { 69 | t.plan(1) 70 | let processedFixtureBlocklist = processBlockListJSON(blockListFixtureData) 71 | t.notOk(hostInBlocklist(processedFixtureBlocklist, 'region.itisacdn.com')) 72 | }) 73 | 74 | test('hostInEntity for entity.properties', function (t) { 75 | t.plan(4) 76 | t.ok(hostInEntity(entityListFixtureData.Facebook.properties, 'facebook.com'), 'facebook.com is in Facebook entity properties') 77 | t.ok(hostInEntity(entityListFixtureData.Facebook.properties, 'sub.instagram.com'), 'sub.instagram.com is in Facebook entity properties') 78 | t.notOk(hostInEntity(entityListFixtureData.Facebook.properties, 'google.com'), 'google.com is NOT in Facebook entity properties') 79 | t.notOk(hostInEntity(entityListFixtureData.Facebook.properties, 'player.ingress.com'), 'player.ingress.com is NOT in Facebook entity properties') 80 | }) 81 | 82 | test('hostInEntity for entity.resources', function (t) { 83 | t.plan(4) 84 | t.ok(hostInEntity(entityListFixtureData.Facebook.resources, 'akamaihd.net'), 'akamaihd.net is in Facebook entity resources') 85 | t.ok(hostInEntity(entityListFixtureData.Facebook.resources, 'sub.akamaihd.net'), 'sub.akamaihd.net is in Facebook entity resources') 86 | t.notOk(hostInEntity(entityListFixtureData.Facebook.resources, 'twimg.com'), 'twimg.com is NOT in Facebook entity resources') 87 | t.notOk(hostInEntity(entityListFixtureData.Facebook.properties, 'user.twimg.com'), 'user.twimg.com is NOT in Facebook entity resources') 88 | }) 89 | -------------------------------------------------------------------------------- /tests/test-requests.js: -------------------------------------------------------------------------------- 1 | var test = require('tape') 2 | var {requestAllower, getRequestEntity} = require('../src/js/requests') 3 | 4 | var entityListFixtureData = require('./entitylist-fixture.json') 5 | 6 | test('allowRequest returns {}', (t) => { 7 | t.plan(1) 8 | let tabID = 1 9 | let totalExecTime = {} 10 | totalExecTime[tabID] = 0 11 | var allowRequest = requestAllower.bind(null, tabID, totalExecTime, Date.now()) 12 | t.deepEqual(allowRequest(), {}) 13 | }) 14 | 15 | test('allowRequest adds some ms to totalExecTime[tabID]', (t) => { 16 | t.plan(1) 17 | let tabID = 1 18 | let totalExecTime = {} 19 | totalExecTime[tabID] = 0 20 | var allowRequest = requestAllower.bind(null, tabID, totalExecTime, 0) 21 | allowRequest() 22 | t.ok(totalExecTime[tabID] > 0, 'added ms to totalExecTime[tabID]') 23 | }) 24 | 25 | test('getRequestEntity request to google.com from facebook.com returns Google and false', (t) => { 26 | t.plan(2) 27 | let requestEntity = getRequestEntity(entityListFixtureData, 'facebook.com', 'google.com', 'facebook.com') 28 | t.equal(requestEntity.entityName, 'Google') 29 | t.notOk(requestEntity.sameEntity) 30 | }) 31 | 32 | test('getRequestEntity request to facebook.com from instagram.com returns Facebook and true', (t) => { 33 | t.plan(2) 34 | let requestEntity = getRequestEntity(entityListFixtureData, 'instagram.com', 'facebook.com', 'instagram.com') 35 | t.equal(requestEntity.entityName, 'Facebook') 36 | t.ok(requestEntity.sameEntity) 37 | }) 38 | 39 | test('getRequestEntity request to facebook.com from github.io iframe on facebook.com returns Facebook and true', (t) => { 40 | t.plan(2) 41 | let requestEntity = getRequestEntity(entityListFixtureData, 'githhub.io', 'facebook.com', 'facebook.com') 42 | t.equal(requestEntity.entityName, 'Facebook') 43 | t.ok(requestEntity.sameEntity) 44 | }) 45 | 46 | test('getRequestEntity request to ap.com from tulsaworld.com iframe returns null and false', (t) => { 47 | t.plan(2) 48 | let requestEntity = getRequestEntity(entityListFixtureData, 'tulsaworld.com', 'ap.com', 'tulsaworld.com') 49 | t.equal(requestEntity.entityName, null) 50 | t.notOk(requestEntity.sameEntity) 51 | }) 52 | -------------------------------------------------------------------------------- /web-ext-artifacts/blok-0.1-fx.xpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla/blok/faac2281c48cd226b4fb8c4e22de588a02328c31/web-ext-artifacts/blok-0.1-fx.xpi -------------------------------------------------------------------------------- /web-ext-artifacts/blok-0.1.1-fx.xpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla/blok/faac2281c48cd226b4fb8c4e22de588a02328c31/web-ext-artifacts/blok-0.1.1-fx.xpi -------------------------------------------------------------------------------- /web-ext-artifacts/blok-0.1.10-fx.xpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla/blok/faac2281c48cd226b4fb8c4e22de588a02328c31/web-ext-artifacts/blok-0.1.10-fx.xpi -------------------------------------------------------------------------------- /web-ext-artifacts/blok-0.1.11-fx.xpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla/blok/faac2281c48cd226b4fb8c4e22de588a02328c31/web-ext-artifacts/blok-0.1.11-fx.xpi -------------------------------------------------------------------------------- /web-ext-artifacts/blok-0.1.12+fx.xpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla/blok/faac2281c48cd226b4fb8c4e22de588a02328c31/web-ext-artifacts/blok-0.1.12+fx.xpi -------------------------------------------------------------------------------- /web-ext-artifacts/blok-0.1.13-fx+an.xpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla/blok/faac2281c48cd226b4fb8c4e22de588a02328c31/web-ext-artifacts/blok-0.1.13-fx+an.xpi -------------------------------------------------------------------------------- /web-ext-artifacts/blok-0.1.14-an+fx.xpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla/blok/faac2281c48cd226b4fb8c4e22de588a02328c31/web-ext-artifacts/blok-0.1.14-an+fx.xpi -------------------------------------------------------------------------------- /web-ext-artifacts/blok-0.1.2-fx.xpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla/blok/faac2281c48cd226b4fb8c4e22de588a02328c31/web-ext-artifacts/blok-0.1.2-fx.xpi -------------------------------------------------------------------------------- /web-ext-artifacts/blok-0.1.3-fx.xpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla/blok/faac2281c48cd226b4fb8c4e22de588a02328c31/web-ext-artifacts/blok-0.1.3-fx.xpi -------------------------------------------------------------------------------- /web-ext-artifacts/blok-0.1.4-fx.xpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla/blok/faac2281c48cd226b4fb8c4e22de588a02328c31/web-ext-artifacts/blok-0.1.4-fx.xpi -------------------------------------------------------------------------------- /web-ext-artifacts/blok-0.1.5-fx.xpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla/blok/faac2281c48cd226b4fb8c4e22de588a02328c31/web-ext-artifacts/blok-0.1.5-fx.xpi -------------------------------------------------------------------------------- /web-ext-artifacts/blok-0.1.6-fx.xpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla/blok/faac2281c48cd226b4fb8c4e22de588a02328c31/web-ext-artifacts/blok-0.1.6-fx.xpi -------------------------------------------------------------------------------- /web-ext-artifacts/blok-0.1.7-fx.xpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla/blok/faac2281c48cd226b4fb8c4e22de588a02328c31/web-ext-artifacts/blok-0.1.7-fx.xpi -------------------------------------------------------------------------------- /web-ext-artifacts/blok-0.1.8-fx.xpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla/blok/faac2281c48cd226b4fb8c4e22de588a02328c31/web-ext-artifacts/blok-0.1.8-fx.xpi -------------------------------------------------------------------------------- /web-ext-artifacts/blok-0.1.9-fx.xpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla/blok/faac2281c48cd226b4fb8c4e22de588a02328c31/web-ext-artifacts/blok-0.1.9-fx.xpi -------------------------------------------------------------------------------- /web-ext-artifacts/blok-1.0.1.xpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla/blok/faac2281c48cd226b4fb8c4e22de588a02328c31/web-ext-artifacts/blok-1.0.1.xpi -------------------------------------------------------------------------------- /web-ext-artifacts/blok-1.0.xpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla/blok/faac2281c48cd226b4fb8c4e22de588a02328c31/web-ext-artifacts/blok-1.0.xpi -------------------------------------------------------------------------------- /web-ext-artifacts/blok-1.0rc1.xpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla/blok/faac2281c48cd226b4fb8c4e22de588a02328c31/web-ext-artifacts/blok-1.0rc1.xpi -------------------------------------------------------------------------------- /web-ext-artifacts/blok-1.0rc10.xpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla/blok/faac2281c48cd226b4fb8c4e22de588a02328c31/web-ext-artifacts/blok-1.0rc10.xpi -------------------------------------------------------------------------------- /web-ext-artifacts/blok-1.0rc2.xpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla/blok/faac2281c48cd226b4fb8c4e22de588a02328c31/web-ext-artifacts/blok-1.0rc2.xpi -------------------------------------------------------------------------------- /web-ext-artifacts/blok-1.0rc3.xpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla/blok/faac2281c48cd226b4fb8c4e22de588a02328c31/web-ext-artifacts/blok-1.0rc3.xpi -------------------------------------------------------------------------------- /web-ext-artifacts/blok-1.0rc7.xpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla/blok/faac2281c48cd226b4fb8c4e22de588a02328c31/web-ext-artifacts/blok-1.0rc7.xpi -------------------------------------------------------------------------------- /web-ext-artifacts/blok-1.0rc8.xpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla/blok/faac2281c48cd226b4fb8c4e22de588a02328c31/web-ext-artifacts/blok-1.0rc8.xpi -------------------------------------------------------------------------------- /web-ext-artifacts/blok-1.0rc9.xpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla/blok/faac2281c48cd226b4fb8c4e22de588a02328c31/web-ext-artifacts/blok-1.0rc9.xpi -------------------------------------------------------------------------------- /web-ext-artifacts/blok-1.1.xpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla/blok/faac2281c48cd226b4fb8c4e22de588a02328c31/web-ext-artifacts/blok-1.1.xpi --------------------------------------------------------------------------------