mediawiki-extensions-Visual.../modules/ve-mw-collab
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
..
ve.init.mw.CollabTarget.css doc: Bump copyright year for 2020 2020-01-08 09:13:24 -08:00
ve.init.mw.CollabTarget.init.js doc: Bump copyright year for 2020 2020-01-08 09:13:24 -08:00
ve.init.mw.CollabTarget.js Remove citefromid alias support 2019-06-20 16:06:07 +01:00
ve.init.mw.DesktopCollabTarget.js eslint: Enable valid-jsdoc 2019-04-17 17:13:39 +01:00
ve.init.mw.MobileCollabTarget.js Delete mobile toolbar flexbox code, upstreamed to VE core 2019-09-03 17:30:19 +00:00
ve.ui.MWExportWikitextDialog.js Use built-in mw.Api 'badtoken' handling, also 'assert'/'assertuser' 2020-02-15 03:37:22 +01:00