Add anchor "mw-oldid" for beginning of page content in diff view
authorFederico Leva <federicoleva@tiscali.it>
Fri, 16 Jan 2015 22:50:34 +0000 (23:50 +0100)
committerNemo bis <federicoleva@tiscali.it>
Wed, 4 Mar 2015 10:09:36 +0000 (10:09 +0000)
* #top, #mw-content-text and others exist, but all point to the
  beginning of the diff, not of the actual page content.
* Pick mw- prefix and technical but familiar related name, in
  the hope it's not confusing nor too hard to remember.
* Lowercase letters, similar to #top, #footer, #file etc. were also
  considered and discard, inspired to usual names:
  https://www.wikidata.org/wiki/Q10966628

Bug: T4313
Change-Id: Ia90f2541327480535e9943ac30bfa19791a19620

includes/diff/DifferenceEngine.php

index 47967e4..f9f9d32 100644 (file)
@@ -546,7 +546,7 @@ class DifferenceEngine extends ContextSource {
                $out = $this->getOutput();
                $revHeader = $this->getRevisionHeader( $this->mNewRev );
                # Add "current version as of X" title
-               $out->addHTML( "<hr class='diff-hr' />
+               $out->addHTML( "<hr class='diff-hr' id='mw-oldid' />
                <h2 class='diff-currentversion-title'>{$revHeader}</h2>\n" );
                # Page content may be handled by a hooked call instead...
                # @codingStandardsIgnoreStart Ignoring long lines.