CoreFiles by mySites.guru
admin-field-changecontext-es5.js12 lines, 385 bytes, from Joomla_4.0.2-Stable-Full_Package.zip
Raw History Compare with 4.0.1
md5
6d18b5cbad76e2d18d901a52920821f4
sha1
0b0ba26fe893d96f4c6872dee18f28936e237bc1
sha256
89b0efefa6a45ce812cb92158c6b8dd5dde34128cfc02eb80bd87802496fc9bc
(function () {
  'use strict';

  Joomla.fieldsChangeContext = function (context) {
    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 23 releases, Joomla 4.0.0-rc1 to 4.1.0-beta2. See them all, or every version of this file.