mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/WikiEditor
synced 2024-11-27 17:50:44 +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 (
|
||
---|---|---|
.. | ||
images | ||
templates | ||
ext.wikiEditor.js | ||
ext.wikiEditor.toolbar.styles.less | ||
jquery.wikiEditor.dialogs.config.js | ||
jquery.wikiEditor.dialogs.config.less | ||
jquery.wikiEditor.dialogs.js | ||
jquery.wikiEditor.dialogs.less | ||
jquery.wikiEditor.html | ||
jquery.wikiEditor.js | ||
jquery.wikiEditor.less | ||
jquery.wikiEditor.toolbar-apex.less | ||
jquery.wikiEditor.toolbar-wikimedia.less | ||
jquery.wikiEditor.toolbar.config.js | ||
jquery.wikiEditor.toolbar.js | ||
jquery.wikiEditor.toolbar.less |