mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/WikiEditor
synced 2024-11-28 02:00:34 +00:00
d1270ed4b6
Using document.activeElement at the time of the unload event as a proxy for whether the user is switching to VE. Switching to VE is weighed more heavily than whether or not the user made changes: switching to VE causes abort.type to be 'switchwithout' regardless of whether changes were made; only if the user isn't switching to VE do we look at whether changes were made and use 'abort' or 'nochange' as appropriate. When wgAction === 'submit' (i.e. we're on a preview / show changes view), it is assumed that the user has made changes. Bug: T95938 Change-Id: Ic91b87c4fc5b601e1fd98b237100d808e97400bd |
||
---|---|---|
i18n | ||
modules | ||
tests/qunit | ||
.gitignore | ||
.gitreview | ||
.jshintrc | ||
composer.json | ||
COPYING | ||
extension.json | ||
README | ||
WikiEditor.hooks.php | ||
WikiEditor.i18n.php | ||
WikiEditor.php |
# WikiEditor provides enhancements to the MediaWiki edit page # This extension requires MediaWiki 1.17+ because it makes use of ResourceLoader. # Example LocalSettings.php additions require_once( "$IP/extensions/WikiEditor/WikiEditor.php" ); # Before configuring this extension, see WikiEditor.php and become familiar with the initial state and structure of the # $wgWikiEditorFeatures configuration variable. Essentially it's an array of arrays, keyed by feature name, each # containing global and user keys with boolean values. "global" indicates that it should be turned on for everyone # always, while user indicates that users should be allowed to turn it on or off in their user preferences. # To enable a preference by default but still allow users to disable it in preferences, use something like... $wgDefaultUserOptions['usebetatoolbar'] = 1; $wgDefaultUserOptions['usebetatoolbar-cgd'] = 1; # Release 1.21 removes the $wgWikiEditorToolbarClickTracking config variable # and with it support for tracking clicks on WikiEditor features via the # ClickTracking extension.