CoreFiles by mySites.guru
admin-field-changecontext.js14 lines, 479 bytes, from Joomla_4.0.0-beta1-Beta-Full_Package.zip
Raw History Compare with 3.9.0-beta4
md5
6c1d2f4107e19cbc52b7c489c5110f4d
sha1
1364fc5d7f1b8dd3f862b3143b3551e0a9eb862b
sha256
1654b164ecde8dbcba51aa63829a567711c0f1b69f127bcd59002f4dc19e0081
/**
* PLEASE DO NOT MODIFY THIS FILE. WORK ON THE ES6 VERSION.
* OTHERWISE YOUR CHANGES WILL BE REPLACED ON THE NEXT BUILD.
**/

Joomla.fieldsChangeContext = function (context) {
  'use strict';

  var regex = new RegExp('([?;&])context[^&;]*[;&]?');
  var url = window.location.href;
  var query = url.replace(regex, '$1').replace(/&$/, ''); // eslint-disable-next-line

  window.location.href = (query.length > 2 ? query + '&' : '?') + (context ? 'context=' + context : '');
};

The same content is in 8 releases, Joomla 4.0.0-alpha12 to 4.0.0-beta7. See them all, or every version of this file.