context.js doesn't seem very useful and could be replaced with a one-liner:
/** * Mobile mode helper class * * @class context * @singleton */ module.exports = { /** * Gets current mobile mode * @memberof context * @instance * @return {string|null} Name of mode - either `stable` or `beta`. It is `null` if desktop. */ getMode: function () { return mw.config.get( 'wgMFMode' ); } };
Acceptance criteria
- context.js is removed
- context.js references are updated to use mw.config.get( 'wgMFMode' ) directly