Currently, Page Previews will load and run on all pages though, fortunately for Reading Web, the links that it works on don't tend to feature on pages like Special:UserLogin or Special:Preferences. Page Previews shouldn't be loaded on a limited subset of pages to avoid any ambiguity.
To be clear, this task isn't about limiting requesting previews for pages, e.g. not requesting previews for special pages; it's about limiting the pages that the Page Previews code is loaded on.
AC
- A configuration variable holds a blacklist of pages that Page Previews must not be loaded on, e.g. wgPopupsPageBlacklist.
- It defaults to Special:UserLogin and Special:CreateAccount
- If a user (logged in or out) navigates to a page in the blacklist, then they aren't delivered the PP code.
- It applies to translated special page names e.g. https://de.m.wikipedia.org/wiki/Spezial:Anmelden
Closed Questions
- Should this be a blacklist?
@phuedx: Yes. You're absolutely right.
- Can we use wgContentNamespaces?
@phuedx: I'd like Page Previews to work in NS_SCHEMA for example. As @Jdlrobson says, the number of places where we want this to run far outweighs the number of places where we don't.
- What should the default value of the blacklist be?
@phuedx: Initially, [ 'Special:UserLogin', 'Special:UserLogout' ].
Before sign off
- Update https://www.mediawiki.org/wiki/Beta_Features/Hovercards with the final list of blacklisted pages.
- Add a note to Schema_talk:Popups explaining that data won't be collected from blacklisted pages.
Testing criteria
Verify that Popups module is not loaded on translated special pages like:
The easiest way to check the popups module is to execute console.log(mw.popups.isEnabled()); in developers console. The expected output is false.