b0y-101 Mini Shell


Current Path : E:/www2/risk/media/com_fields/js/
File Upload :
Current File : E:/www2/risk/media/com_fields/js/admin-field-changecontext.js

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 : '');
};

Copyright © 2019 by b0y-101