Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test WEE that changes a pref using an experimental API. #5

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

biancadanforth
Copy link
Owner

@biancadanforth biancadanforth commented Apr 5, 2018

Based on prior work in the Shield Studies Addon Template repo (mozilla/shield-studies-addon-template#55) and Shield Studies Addon Utils repo (mozilla/shield-studies-addon-utils#120).

This was just a proof-of-concept for me to understand the basics of creating experimental APIs for use in WebExtension Experiments (WEEs).

This WEE simply sets the "browser.privatebrowsing.autostart" boolean preference to "true" via an experimental "prefchange" WebExtension API.

Note: I don't currently use the stub study experimental API (which is where we will put our StudyUtils.jsm module) at all.

Based on prior work in the Shield Studies Addon Template repo (mozilla/shield-studies-addon-template#55) and Shield Studies Addon Utils repo (mozilla/shield-studies-addon-utils#120).

This was just a proof-of-concept for me to understand the basics of creating experimental APIs for use in WebExtension Experiments (WEEs).

This WEE simply sets the "browser.privatebrowsing.autostart" boolean preference to "true" via an experimental "prefchange" WebExtension API.
@biancadanforth biancadanforth requested a review from aswan April 5, 2018 00:12
},

"background": {
"scripts": ["background.js"]
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: indenting looks a bit off here. But super small micro-nit, since I can run everything through prettier (npm run format) and autoformat and submit a PR.

Copy link
Collaborator

@aswan aswan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The prefchange module looks good to me. I didn't look through study since it appears to be built from webpack (and it isn't used in this extension)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants