CoreFiles by mySites.guru
admin-field-changecontext.js12 lines, 454 bytes, from Joomla_5.4.8-Stable-Full_Package.zip
Raw History Compare with 5.4.7
md5
3bf76188ba9475eb178e6fbb4182cd48
sha1
cd4bbc8d287501b4e38ebaa6714180b6cc9a23f8
sha256
33bdc1c07d6e6b448d6e2e1e16bd351bb8ff8194bb87e46103ccf5b4bf293c7e
/**
 * @copyright  (C) 2018 Open Source Matters, Inc. <https://www.joomla.org>
 * @license    GNU General Public License version 2 or later; see LICENSE.txt
 */

Joomla.fieldsChangeContext = context => {

  const regex = /([?;&])context[^&;]*[;&]?/;
  const url = window.location.href;
  const query = url.replace(regex, '$1').replace(/&$/, '');
  window.location.href = (query.length > 2 ? query + '&' : '?') + (context ? 'context=' + context : '');
};

The same content is in 76 releases, Joomla 5.4.0-beta1 to 6.3.0-alpha1. See them all, or every version of this file.