From b0c53063d2ba2c31fb04d9611b0529ead5fee043 Mon Sep 17 00:00:00 2001 From: groovecoder Date: Tue, 2 May 2017 11:42:14 -0500 Subject: [PATCH] start shield study AFTER SDK starts the webext --- index.js | 2 +- study.js | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/index.js b/index.js index 76beafb..cb1a893 100644 --- a/index.js +++ b/index.js @@ -60,7 +60,7 @@ const prefService = require("sdk/preferences/service"); const self = require("sdk/self"); const { Services } = require("resource://gre/modules/Services.jsm"); const ss = require("sdk/simple-storage"); -const study = require("./study"); +const { study } = require("./study"); const { Style } = require("sdk/stylesheet/style"); const tabs = require("sdk/tabs"); const tabsUtils = require("sdk/tabs/utils"); diff --git a/study.js b/study.js index fc5323c..335d3e0 100644 --- a/study.js +++ b/study.js @@ -19,7 +19,9 @@ const studyConfig = { class ContainersStudy extends shield.Study { isEligible () { - console.log("ContainersStudy.isEligible()"); + // If the user already has testpilot-containers extension, they are in the + // Test Pilot experiment, so exclude them. + return super.isEligible(); } whenEligible () { @@ -42,4 +44,4 @@ const thisStudy = new ContainersStudy(studyConfig); unload((reason) => thisStudy.shutdown(reason)); -thisStudy.startup(self.loadReason); +exports.study = thisStudy;