CoreFiles by mySites.guru
admin-field-changecontext.js8 lines, 333 bytes, from Joomla_4.0.2-Stable-Full_Package.zip
Raw History Compare with 4.0.1
md5
566f4ef945a8ccc37bae2eb115020e7f
sha1
01dd3e79b1dce2c8654ab1a6cc2eb4f69912bd94
sha256
ae04d22e9e69ea5f610c24aefa1970905c1cff1e1deceeb3483a6246e9665a7e
Joomla.fieldsChangeContext = context => {

  const regex = new RegExp('([?;&])context[^&;]*[;&]?');
  const url = window.location.href;
  const 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 23 releases, Joomla 4.0.0-rc1 to 4.1.0-beta2. See them all, or every version of this file.