Bug 1486631 - Add CFR, search shortcut fixes, and bug fixes to Activity Stream r=Mardak,ursula
MozReview-Commit-ID: HZbYyg4FGwi Differential Revision: https://phabricator.services.mozilla.com/D4392
This commit is contained in:
13
browser/components/newtab/content-src/lib/asroutercontent.js
Normal file
13
browser/components/newtab/content-src/lib/asroutercontent.js
Normal file
@@ -0,0 +1,13 @@
|
||||
export function enableASRouterContent(store, asrouterContent) {
|
||||
// Enable asrouter content
|
||||
store.subscribe(() => {
|
||||
const state = store.getState();
|
||||
if (state.Prefs.values.asrouterExperimentEnabled && !asrouterContent.initialized) {
|
||||
asrouterContent.init();
|
||||
} else if (!state.Prefs.values.asrouterExperimentEnabled && asrouterContent.initialized) {
|
||||
asrouterContent.uninit();
|
||||
}
|
||||
});
|
||||
// Return this for testing purposes
|
||||
return {asrouterContent};
|
||||
}
|
||||
Reference in New Issue
Block a user