README.md 2.23 KB
Newer Older
Gregory John Martin's avatar
Gregory John Martin committed
1
2
# Study: Beyond the Paywall
This repository contains the extension code for Greg Martin and Shoshana Vasserman's study to be hosted by Mozilla Rally.
Brian Chivers's avatar
Brian Chivers committed
3
4
5
6
7
8
9
10
11
12
13
14
15
16

## What's in this repo?

* `/schemas`
    * This directory contains files that outline the data being sent to Mozilla's servers, and examples of that data.
* `/src`
    * This directory contains the source code for this extension
* `/tests/integration`
    * This directory would contain integration tests
    * It's currently (as of 5/11/21) just the template scripts
* `manifest.json`
    * This file contains important permission information, as well as the location of the background script to run
* `package.json`
    * This file contains important information about dependant packages and npm scripts
17
18
19
* `web-ext-config.js`  
    * This file contains information to run the extension locally
    * The use of Firefox nightly is configured in this file
Brian Chivers's avatar
Brian Chivers committed
20
21
22
23
24
25
26
27
28
29
30
31

## How do I run this extension locally?

* Start by cloning this repository
* You might need the Firefox nightly build, which can be downloaded [here](http://nightly.mozilla.org)
* You'll also need to install [`node`](https://nodejs.org/en/download/) and [`npm`](https://www.npmjs.com/get-npm) locally.  
* In the root directory of the repo, run `npm install` to install all dependency packages
* In the root directory of the repo, run `npm run build` and ensure there are no errors
* Once you've built the package without errors, you can run `npm run watch` to start the extension.  A version of Firefox with the extension should start automatically.
    * In `about:debugging`, you should see your extension under "This Firefox"
    * If you click "Inspect", you'll be guided to a debugging site for your extension
    * The data should be available under Storage >  Extension Storage > moz-extension://......
Brian Chivers's avatar
Brian Chivers committed
32
    * If you want to dump the current data, type `let data = await browser.storage.local.get()` in the debugging console, and then print the `data` variable. You can copy the object from there
33
        * Note: This command must be run from the `about:debugging` -> Extension Console.  It won't work from the normal Firefox console.
Brian Chivers's avatar
Brian Chivers committed
34
35

Note: These instructions are written for a MacOSX user. They'll likely be very similar for a Linux user, but not for Windows.