RCFilters: Only normalize title with 'target' when it is needed
authorMoriel Schottlender <moriel@gmail.com>
Tue, 19 Dec 2017 22:17:48 +0000 (14:17 -0800)
committerMoriel Schottlender <moriel@gmail.com>
Fri, 22 Dec 2017 03:12:14 +0000 (19:12 -0800)
commitca2a24cf172313d69908f7e98cbc4a0eab2f5130
tree39d848dcdc8a7ef2cd4d3ecb9ceaf4b026fe694f
parent13df3d2290ba2836ad14e7de664a2671952c5ddb
RCFilters: Only normalize title with 'target' when it is needed

We right now only need to normalize titles that are with subpages
into target= parameter in the RCLinked page. There's no need to do
that in RC or Watchlist, and it might interfere with other (or future)
features if we do.

This commit sets the normalization as conditional on a config
variable, that is given on initialization based on the proper
page we're in.

Change-Id: I288221edb143e0b3417e161062faf2eb4f9f9a51
resources/src/mediawiki.rcfilters/mw.rcfilters.Controller.js
resources/src/mediawiki.rcfilters/mw.rcfilters.UriProcessor.js
resources/src/mediawiki.rcfilters/mw.rcfilters.init.js
tests/qunit/suites/resources/mediawiki.rcfilters/UriProcessor.test.js