mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/WikiEditor
synced 2024-11-15 03:35:58 +00:00
0f24c10873
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 (
|
||
---|---|---|
.phan | ||
i18n | ||
includes | ||
modules | ||
tests/qunit | ||
.eslintrc.json | ||
.gitignore | ||
.gitreview | ||
.phpcs.xml | ||
.stylelintrc.json | ||
CODE_OF_CONDUCT.md | ||
composer.json | ||
COPYING | ||
extension.json | ||
Gruntfile.js | ||
package-lock.json | ||
package.json | ||
README |
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