If you go to https://en.wikipedia.org/wiki/Book (for example) and inspect `mw.config.values`, you'll notice JS variables specific to Minerva and/or mobile in the console. Would it make more sense to expose these in mobile mode only?
= Acceptance criteria / QA steps
[] wgMinerva config variables show up on Minerva desktop (https://en.wikipedia.org?useskin=minerva)
[] wgMinerva config variables show up on Minerva mobile
[] wgMinerva config variables DO NOT show up on desktop Vector
[] wgMF config variables DO NOT show up on desktop Vector
[] wgMF config variables show up on mobile Vector (https://en.m.wikipedia.org?useskin=vector)
[] wgMF config variables show up on mobile Timeless (https://en.m.wikipedia.org?useskin=vector)
[] wgMF config variables show up on mobile Minerva (https://en.m.wikipedia.org?useskin=vector)
[] Drop wgMFDescription from Minerva (unused)
[]
= Developer notes
== Minerva
After navigating to Vector (desktop) and running the following, I see:
```
Object.keys(mw.config.values).filter((key)=>key.indexOf('Minerva' ) > -1)
(3) ["wgMinervaABSamplingRate", "wgMinervaErrorLogSamplingRate", "wgMinervaReadOnly"]
```
Minerva variables should be limited to the Minerva skin.
Currently, all 3 of these variables are added via onResourceLoaderGetConfigVars hook. This doesn't appear to have access to the current skin. Per [[ https://www.mediawiki.org/wiki/Manual:Hooks/ResourceLoaderGetConfigVars | definition ]]
"Called right before ResourceLoaderStartUpModule::getConfig returns, to set static (not request-specific) configuration variables. Can not depend on current page, current user or current request; see below."
== MobileFrontend
```
Object.keys(mw.config.values).filter((key)=>key.indexOf('MF' ) > -1)
(17) ["wgMFMobileFormatterHeadings", "wgMFSearchAPIParams", "wgMFQueryPropModules", "wgMFSearchGenerator", "wgMFNearbyEndpoint", "wgMFThumbnailSizes", "wgMFEditorOptions", "wgMFLicense", "wgMFSchemaEditSampleRate", "wgMFExperiments", "wgMFEnableJSConsoleRecruitment", "wgMFPhotoUploadEndpoint", "wgMFDeviceWidthTablet", "wgMFCollapseSectionsByDefault", "wgMFExpandAllSectionsUserOption", "wgMFEnableFontChanger", "wgMFDisplayWikibaseDescriptions"]
```
There are many more config variables in MobileFrontend. Many of them are are designed to only operate in mobile target mode (mobile domain) however some of them due to Minerva being a desktop and mobile skin need to be loaded on both (but limited to Minerva)
Modules added via onResourceLoaderGetConfigVars need to be restricted to where MobileContext->isMobileMode is true.
= Open questions / blockers
[] How can we use onResourceLoaderGetConfigVars but still ensure config is shipped via JavaScript and not the HTML (and thus subject to 5 min cache not varnish cache?
[] Is there a way to check skin/context inside ResourceLoaderGetConfigVars hook?
[] Is there a way for a ResourceLoader module to add these config?