mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/WikiEditor
synced 2024-11-28 02:00:34 +00:00
Perform 25% sampling on the client side as well
Needed because session IDs can be generated on the client from the unload handler (when the back button is used). Bug: T95919 Change-Id: Iac921bc36806205fc11ac76154ed8b3890f10d31
This commit is contained in:
parent
7806fff4c4
commit
cc5ca3a2f6
|
@ -10,6 +10,13 @@
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Sample 25% (via hex digit)
|
||||||
|
// We have to do this on the client too because the unload handler
|
||||||
|
// can cause an editingSessionId to be generated on the client
|
||||||
|
if ( editingSessionId.charAt( 0 ) > '3' ) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
mw.loader.using( 'schema.Edit' ).done( function () {
|
mw.loader.using( 'schema.Edit' ).done( function () {
|
||||||
data = $.extend( {
|
data = $.extend( {
|
||||||
version: 1,
|
version: 1,
|
||||||
|
|
Loading…
Reference in a new issue