Name Description Size
ASRouter.jsm 66649
ASRouterFeed.jsm @class ASRouterFeed - Connects ASRouter singleton (see above) to Activity Stream's store so that it can use the RemotePageManager. 1222
ASRouterPreferences.jsm 7099
ASRouterTargeting.jsm CachedTargetingGetter @param property {string} Name of the method called on ActivityStreamProvider @param options {{}?} Options object passsed to ActivityStreamProvider method @param updateInterval {number?} Update interval for query. Defaults to FRECENT_SITES_UPDATE_INTERVAL 21823
ASRouterTriggerListeners.jsm Check current location against the list of whitelisted hosts Additionally verify for redirects and check original request URL against the whitelist. @returns {object} - {host, url} pair that matched the whitelist 16833
AboutPreferences.jsm Render preferences to an about:preferences content window with the provided preferences structure. 9527
ActivityStream.jsm 23256
ActivityStreamMessageChannel.jsm ActivityStreamMessageChannel - This module connects a Redux store to a RemotePageManager in Firefox. Call .createChannel to start the connection, and .destroyChannel to destroy it. You should use the BroadcastToContent, AlsoToOneContent, and AlsoToMain action creators in common/Actions.jsm to help you create actions that will be automatically routed to the correct location. @param {object} options @param {function} options.dispatch The dispatch method from a Redux store @param {string} options.pageURL The URL to which a RemotePageManager should be attached. Note that if it is about:newtab, the existing RemotePageManager for about:newtab will also be disabled @param {string} options.outgoingMessageName The name of the message sent to child processes @param {string} options.incomingMessageName The name of the message received from child processes @return {ActivityStreamMessageChannel} 10612
ActivityStreamPrefs.jsm Prefs - A wrapper around Preferences that always sets the branch to ACTIVITY_STREAM_PREF_BRANCH 3065
ActivityStreamStorage.jsm @param storeNames Array of strings used to create all the required stores 3307
BookmarkPanelHub.jsm @param {function} handleMessageRequest @param {function} addImpression @param {function} dispatch - Used for sending user telemetry information 10814
CFRMessageProvider.jsm 25820
CFRPageActions.jsm A WeakMap from browsers to {host, recommendation} pairs. Recommendations are defined in the ExtensionDoorhanger.schema.json. A recommendation is specific to a browser and host and is active until the given browser is closed or the user navigates (within that browser) away from the host. 37241
DiscoveryStreamFeed.jsm Send SPOCS Fill telemetry. @param {object} filteredItems An object keyed on filter reasons, and the value is a list of SPOCS. reasons: blocked_by_user, frequency_cap, below_min_score, flight_duplicate @param {boolean} fullRecalc A boolean indicating if it's a full recalculation. Calling `loadSpocs` will be treated as a full recalculation. Whereas responding the action "DISCOVERY_STREAM_SPOC_IMPRESSION" is not a full recalculation. 53153
DownloadsManager.jsm null for non-private downloads 5689
FaviconFeed.jsm Get favicon info (uri and size) for a uri from Places. @param uri {nsIURI} Page to check for favicon data @returns A promise of an object (possibly null) containing the data 5965
FilterAdult.jsm Run some text through md5 and return the base64 result. 89163
HighlightsFeed.jsm Chronologically sort highlights of all types except 'visited'. Then just append the rest at the end of highlights. @param {Array} pages The full list of links to order. @return {Array} A sorted array of highlights 11136
LinksCache.jsm Cache link results from a provided object property and refresh after some amount of time has passed. Allows for migrating data from previously cached links to the new links with the same url. 4801
NaiveBayesTextTagger.jsm Determines if the tokenized text belongs to class according to binary naive Bayes classifier. Returns an object containing the class label ("label"), and the log probability ("logProb") that the text belongs to that class. If the positive class is more likely, then "label" is the positive class label. If the negative class is matched, then "label" is set to null. 2222
NewTabInit.jsm NewTabInit - A placeholder for now. This will send a copy of the state to all newly opened tabs. 1718
NmfTextTagger.jsm A multiclass classifier that scores tokenized text against several classes through inference of a nonnegative matrix factorization of TF-IDF vectors and class labels. Returns a map of class labels as string keys to scores. (Higher is more confident.) All classes get scored, so it is up to consumer of this data determine what classes are most valuable. 2082
OnboardingMessageProvider.jsm globals Localization 20087
PanelTestProvider.jsm 15783
PersistentCache.jsm A file (disk) based persistent cache of a JSON serializable object. 2801
PersonalityProvider.jsm V2 provider builds and ranks an interest profile (also called an “interest vector”) off the browse history. This allows Firefox to classify pages into topics, by examining the text found on the page. It does this by looking at the history text content, title, and description. 13849
PlacesFeed.jsm Observer - a wrapper around history/bookmark observers to add the QueryInterface. 15595
PrefsFeed.jsm 5594
RecipeExecutor.jsm RecipeExecutor is the core feature engineering pipeline for the in-browser personalization work. These pipelines are called "recipes". A recipe is an array of objects that define a "step" in the recipe. A step is simply an object with a field "function" that specifies what is being done in the step along with other fields that are semantically defined for that step. There are two types of recipes "builder" recipes and "combiner" recipes. Builder recipes mutate an object until it matches some set of critera. Combiner recipes take two objects, (a "left" and a "right"), and specify the steps to merge the right object into the left object. A short nonsense example recipe is: [ {"function": "get_url_domain", "path_length": 1, "field": "url", "dest": "url_domain"}, {"function": "nb_tag", "fields": ["title", "description"]}, {"function": "conditionally_nmf_tag", "fields": ["title", "description"]} ] Recipes are sandboxed by the fact that the step functions must be explicitly whitelisted. Functions whitelisted for builder recipes are specifed in the RecipeExecutor.ITEM_BUILDER_REGISTRY, while combiner functions are whitelisted in RecipeExecutor.ITEM_COMBINER_REGISTRY . 32945
RemoteL10n.jsm The downloaded Fluent file is located in this sub-directory of the local profile directory. 2988
Screenshots.jsm Get a screenshot / thumbnail for a url. Either returns the disk cached image or initiates a background request for the url. @param url {string} The url to get a thumbnail @return {Promise} Resolves a custom object or null if failed 4115
SearchShortcuts.jsm 2617
SectionsManager.jsm Generators for built in sections, keyed by the pref name for their feed. Built in sections may depend on options stored as serialised JSON in the pref `${feed_pref_name}.options`. 19026
ShortURL.jsm Properly convert internationalized domain names. @param {string} host Domain hostname. @returns {string} Hostname suitable to be displayed. 2347
SiteClassifier.jsm classifySite Classifies a given URL into a category based on classification data from RemoteSettings. The data from remote settings can match a category by one of the following: - match the exact URL - match the hostname or second level domain (sld) - match query parameter(s), and optionally their values or prefixes - match both (hostname or sld) and query parameter(s) The data looks like: [{ "type": "hostname-and-params-match", "criteria": [ { "url": "", "hostname": "", "sld": "secondleveldomain", "params": [ { "key": "matchparam", "value": "matchvalue", "prefix": "matchpPrefix", }, ], }, ], "weight": 300, },...] 2977
SnippetsTestMessageProvider.jsm 23442
Store.jsm Store - This has a similar structure to a redux store, but includes some extra functionality to allow for routing of actions between the Main processes and child processes via a ActivityStreamMessageChannel. It also accepts an array of "Feeds" on inititalization, which can listen for any action that is dispatched through the store. 6324
SystemTickFeed.jsm 1118
TelemetryFeed.jsm 32680
TippyTopProvider.jsm 1789
Tokenize.jsm 12657
ToolbarBadgeHub.jsm Pref is set via Remote Settings message. We want to continously monitor new messages that come in to ensure the one with the highest priority is set. 12450
ToolbarPanelHub.jsm 19814
TopSitesFeed.jsm 26385
TopStoriesFeed.jsm 30684
UTEventReporting.jsm Note: the schema can be found in 2150
UserDomainAffinityProvider.jsm Provides functionality to personalize content recommendations by calculating user domain affinity scores. These scores are used to calculate relevance scores for items/recs/stories that have domain affinities. The algorithm works as follows: - The recommendation endpoint returns a settings object containing timeSegments and parametersets. - For every time segment we calculate the corresponding domain visit counts, yielding result objects of the following structure: {"": 12, "": 34} (see UserDomainAffinityProvider#queryVisits) - These visit counts are transformed to domain affinity scores for all provided parameter sets: {"": {"paramSet1": 0.8, "paramSet2": 0.9}, "": {"paramSet1": 1, "paramSet2": 0.9}} (see UserDomainAffinityProvider#calculateScoresForParameterSets) - The parameter sets provide factors for weighting which allows for flexible targeting. The functionality to calculate final scores can be seen in UserDomainAffinityProvider#calculateScores - The user domain affinity scores are summed up across all time segments see UserDomainAffinityProvider#calculateAllUserDomainAffinityScores - An item's domain affinities are matched to the user's domain affinity scores by calculating an item relevance score (see UserDomainAffinityProvider#calculateItemRelevanceScore) - The item relevance scores are used to sort items (see TopStoriesFeed for more details) - The data structure was chosen to allow for fast cache lookups during relevance score calculation. While user domain affinities are calculated infrequently (i.e. only once a day), the item relevance score (potentially) needs to be calculated every time the feed updates. Therefore allowing cache lookups of scores[domain][parameterSet] is beneficial 13556