Page MenuHomePhabricator

Load the module mediawiki.page.watch.ajax only when there is a watch button on the page
Closed, ResolvedPublic

Description

Currently the module mediawiki.page.watch.ajax is loaded on all pages when the general preconditions are present. On pages without a watch button this module is useless.

For example:

Expected result: Load the module mediawiki.page.watch.ajax only when there is a watch button on the page.

Details

Related Gerrit Patches:

Event Timeline

Fomafix created this task.Sep 14 2015, 12:39 PM
Fomafix claimed this task.
Fomafix raised the priority of this task from to Low.
Fomafix updated the task description. (Show Details)
Fomafix added a project: MediaWiki-General.
Fomafix added a subscriber: Fomafix.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptSep 14 2015, 12:39 PM

Change 238131 had a related patch set uploaded (by Gerrit Patch Uploader):
Load the module mediawiki.page.watch.ajax only when required

https://gerrit.wikimedia.org/r/238131

Krinkle set Security to None.
Krinkle added a subscriber: Krinkle.
Umherirrender closed this task as Resolved.Sep 17 2015, 7:46 PM

Change 238131 merged by jenkins-bot:
Load the module mediawiki.page.watch.ajax only when needed

https://gerrit.wikimedia.org/r/238131

Verified on enwiki:

https://en.wikipedia.org/wiki/Special:WhatLinksHere:

mw.loader.getState( 'mediawiki.page.watch.ajax' ) // "registered"

https://en.wikipedia.org/wiki/Special:WhatLinksHere/Foo:

mw.loader.getState( 'mediawiki.page.watch.ajax' ) // "ready"