Go to file
Thiemo Kreuz 4152c6cdf4 Make backlink highlighting robust when "mw-cite-backlink" is missing
The class="mw-cite-backlink" is part of a message. It should be
considered code and not be customized, but can be. Frwiki for example
localized it.

The new code still hopes to find the class, and still hopes the first
child is the text node containing the plain text up arrow. (See the
message "cite_references_link_many" which contains all this.) This code
path is kept because it is more performant.

If the class is not found, the upwards traversal done via .closest()
stops at the <li>. It then traverses down into the firstChild nodes,
hoping to find the plain text up arrow this way.

This patch makes the code work with the customizations found in frwiki.

Bug: T205270
Bug: T210508
Change-Id: I32552ebe820ee12aea1a75aa17af11298dc7536a
2018-11-28 12:35:05 +01:00
i18n Improve a11y support on backlinks 2018-11-26 11:36:26 +01:00
includes Rearrange Cite::listToText for performance 2018-11-21 18:16:55 +00:00
modules Make backlink highlighting robust when "mw-cite-backlink" is missing 2018-11-28 12:35:05 +01:00
tests Add browser tests for linking the main backlink 2018-11-20 13:21:30 +01:00
.eslintrc.json Remove obsolete aliases from closures 2018-11-13 14:43:45 -08:00
.gitignore Add phan configuration for static analysis 2017-12-29 11:50:01 -08:00
.gitreview Whoops, track not trace 2016-10-24 17:02:15 -07:00
.phpcs.xml Remove @static doc annotations 2018-09-10 16:24:40 +00:00
.stylelintrc.json Use json extension for .stylelintrc 2017-08-19 09:39:19 +02:00
AUTHORS.txt Fix expected remove data to match actual remove data exactly 2017-08-13 11:41:30 -04:00
CODE_OF_CONDUCT.md build: Updating mediawiki/mediawiki-codesniffer to 22.0.0 2018-09-02 23:29:58 +00:00
composer.json build: Updating mediawiki/mediawiki-codesniffer to 23.0.0 2018-11-14 08:53:25 +00:00
COPYING.txt Add license details and give credit to more authors (based on git shortlog) 2014-07-26 16:16:47 -07:00
extension.json Improve a11y support on backlinks 2018-11-26 11:36:26 +01:00
Gruntfile.js Add first browser test 2018-11-19 16:08:42 +00:00
MIT-LICENSE.txt doc: Bump copyright year 2018-01-02 17:05:50 -08:00
package.json Add first browser test 2018-11-19 16:08:42 +00:00
README.md Store references in page_props and cache 2016-02-10 14:47:02 +01:00

Cite

The Cite extension provides a way for users to create references as footnotes to articles.

See https://www.mediawiki.org/wiki/Extension:Cite for detailed documentation.

Configuration

  • $wgCiteStoreReferencesData: If set to true, references are saved in the database so that other extensions can retrieve them independently of the main article content.
  • $wgCiteCacheReferencesDataOnParse: ($wgCiteStoreReferencesData required) By default, references are cached only on database access. If set to true, references are also cached whenever pages are parsed.