Module: isPagePreviewsEnabled

(require("isPagePreviewsEnabled"))(user, userSettings, config) → {boolean|null}

Given the global state of the application, creates a function that gets whether or not the user should have Page Previews enabled.

Page Previews is disabled when the Navigation Popups gadget is enabled.

If Page Previews is configured as a user preference, then the user must either be logged in and have enabled the preference or be logged out and have not disabled previews via the settings modal.

Name Type Description
user mw.User

The mw.user singleton instance

userSettings Object

An object returned by userSettings.js

config mw.Map

Null when there is no way the popup type can be enabled at run-time.

boolean | null