Go to file
Timo Tijhof 0f24c10873 jquery.wikiEditor: change autoIcon() to no longer append version string
Remove use of mw.loader.getVersion, which I'm planning to remove
from the public API. The only valid use case I found of it (not
in WMF repos) is to check if a module exists, for which one can
use mw.loader.getState() already.

The code path here handles with the 'icon' property of a
WikiEditor "toolbar group tool". In other words, the buttons
you can click in the toolbar to open a dialog or insert markup.

I found two ways to reach this code path:

* For the built-in tools and icons that are part of WikiEditor.
  These are all based on OOUI now and no longer use inline styles
  with background-image etc., they are class-based instead, with
  the URLs and language variants handled server-side by RL.

* For user scripts that register a custom tool and icon.
  To try this, copy snippets to the console on an edit page from
  <https://meta.wikimedia.org/wiki/User:Krinkle/Scripts/InsertWikiEditorButton>

  These pass urls as the 'icon' property and thus don't satisfy
  the hasOwn condition in this code. And even if they did, there'd
  be no reason for the module version to be helpful to the thumbnail
  url the user would have passed.

This line of code has existed with the mw.loader.getVersion() call
since the repository's very first commit in 2010 (9d278e8dee).

The worst that can happen is if there are stil some internal icons
hitting this path, they'll be cached for 1 hour instead of 7 days
(per /w/static.php rules in production). For third parties, there
would be no difference and such static paths have no caching by
default either way (outside WMF).

Change-Id: I6ec29abde0085d04b662b56b5ebcc2bd7fa267f8
2020-04-07 20:55:01 +01:00
.phan Upgrade to new phan 2019-03-16 21:44:36 -07:00
i18n Localisation updates from https://translatewiki.net. 2020-04-07 08:53:03 +02:00
includes Improve param docs 2020-02-29 22:18:42 +01:00
modules jquery.wikiEditor: change autoIcon() to no longer append version string 2020-04-07 20:55:01 +01:00
tests/qunit Upgrade to new phan 2019-03-16 21:44:36 -07:00
.eslintrc.json build: Update linters 2019-10-29 22:16:13 +00:00
.gitignore build: Updating npm dependencies for security issues 2019-06-09 04:32:34 +00:00
.gitreview Whoops, track not trace 2016-10-24 17:04:09 -07:00
.phpcs.xml Improve param docs 2020-02-29 22:18:42 +01:00
.stylelintrc.json Use json extension for .stylelintrc 2017-08-19 10:55:02 +02:00
CODE_OF_CONDUCT.md build: Updating mediawiki/phan-taint-check-plugin to 1.3.0 2018-08-19 17:48:56 +00:00
composer.json build: Updating composer dependencies 2020-01-30 10:23:54 +00:00
COPYING Add COPYING 2014-01-22 22:11:36 +00:00
extension.json Lazy load the modules for the upload dialog 2020-03-03 06:25:51 +01:00
Gruntfile.js build: Updating mediawiki/minus-x to 0.3.2 2019-12-18 19:14:50 +00:00
package-lock.json build: Updating postcss-sass to 0.4.4 2020-04-05 11:24:15 +00:00
package.json build: Updating minimist to 1.2.5 2020-03-19 21:31:33 +00:00
README Update README 2019-02-23 16:36:49 +00:00

WikiEditor provides enhancements to the MediaWiki edit page

# This extension requires MediaWiki 1.33 or higher.

For installation, once the code is copied into your extensions directory, you can load it for your
wiki by adding to LocalSettings.php the line:

	wfLoadExtension( 'WikiEditor' );

By default, when installed this extension will be available to all users, and logged-in users can
disable it from their preferences. If you wish all users to have it, and be unable to disable it,
add it to $wgHiddenPrefs in your LocalSettings.php:

	$wgHiddenPrefs[] = 'usebetatoolbar';

More can be found on the extension's page: https://www.mediawiki.org/wiki/Extension:WikiEditor