On redirects update the URL to that of the target page with JavaScript
authorBartosz Dziewoński <matma.rex@gmail.com>
Tue, 8 Jul 2014 00:50:37 +0000 (02:50 +0200)
committerBartosz Dziewoński <matma.rex@gmail.com>
Wed, 20 Aug 2014 20:21:33 +0000 (20:21 +0000)
commitc49bd9cb14a9af678b155d1faecc93413945a8de
tree294778b7a8766ef09d3b9910c5864bee4f46a1a1
parent417bd4e92a87a7a91ad232cb821ca2eab8ec8c5d
On redirects update the URL to that of the target page with JavaScript

Redirects to sections will now update the URL in browser's address bar
using the HTML5 History API. When [[Dog]] redirects to [[Animals#Dog]],
the user will now see "Animals#Dog" in their browser instead of "Dog#Dog".

The target URL is generated server-side to avoid pulling in dependencies
in the client-side RL module, which is loaded in the top queue.

Browsers that do not support the History API are still supported, the
way they always were.

Given the following three pages:
* A: #REDIRECT [[C]]
* B: #REDIRECT [[C#Section]]
* C: ==Section== \n ==Other section== \n

The following links should behave as follows:
* A                →  C
* B                →  C#Section
* A#Other_section  →  C#Other_section
* B#Other_section  →  C#Other_section

The code also supports forwarding query parameters like 'debug=1'.

Bug: 35045
Bug: 39328
Change-Id: I9d8d834762e19b836b7e35122b6c4cef0f91b7f0
RELEASE-NOTES-1.24
includes/page/Article.php
resources/Resources.php
resources/src/mediawiki.action/mediawiki.action.view.redirect.js [new file with mode: 0644]
resources/src/mediawiki.action/mediawiki.action.view.redirectToFragment.js [deleted file]