CoreFiles by mySites.guru
admin-field-changecontext.js8 lines, 321 bytes, from Joomla_4.2.3-Stable-Full_Package.zip
Raw History Compare with 4.2.2
md5
22f0b30cfbac25a314f0095d8926862e
sha1
b3445f71307adfbc1168f5592586de4ca0eff1d1
sha256
f385d279ae60160f21d866374e75868067107c554aa99ac25658254fbe7cf100
Joomla.fieldsChangeContext = context => {

  const regex = /([?;&])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 45 releases, Joomla 4.0.6-rc1 to 4.2.9. See them all, or every version of this file.