mediawiki-extensions-Visual.../modules/ve-mw
Bartosz Dziewoński 58757d4e3e Use built-in mw.Api 'badtoken' handling, also 'assert'/'assertuser'
When the user is saving their edit, we want to ensure that they
understand how it will be attributed. If the user gets logged out or
logs in in another tab, we want to display a message about it before
saving.

Instead of manually managing tokens and handling the 'badtoken' error
to detect this, use the 'assert'/'assertuser' parameters for the API
to detect it for us. Thanks to this we can rely on automatic retrying
for 'badtoken' errors in mw.Api#postWithToken.

It will be possible to share some of this code with other extensions
that already use ArticleTargetSaver, namely DiscussionTools, now that
it doesn't need to manage tokens for VisualEditor.

Bug: T245327
Depends-On: I485f99e1f5f493262b0c9af22370da01adf1e09c
Change-Id: I37f8e89b6d92c419d1b6569891612256342f8139
2020-02-15 03:37:22 +01:00
..
ce Improve rendering of audio files (for real this time) 2020-02-14 04:18:28 +01:00
dm Improve rendering of audio files (for real this time) 2020-02-14 04:18:28 +01:00
init Use built-in mw.Api 'badtoken' handling, also 'assert'/'assertuser' 2020-02-15 03:37:22 +01:00
preinit ArticleTargetSaver: Fix error messages 2020-02-12 22:18:40 +01:00
tests Only preserve data-parsoid/RESTBase ID on transclusion nodes 2020-02-12 22:51:43 +00:00
themes doc: Bump copyright year for 2020 2020-01-08 09:13:24 -08:00
ui Merge "Use mw.Api#getErrorMessage instead of custom handling" 2020-01-10 14:22:14 +00:00
ve.MWutils.js doc: Bump copyright year for 2020 2020-01-08 09:13:24 -08:00