BigW Consortium Gitlab

experimental_flags.js 285 Bytes
Newer Older
1 2 3
import Cookies from 'js-cookie';

export default () => {
Phil Hughes committed
4
  $('.js-experiment-feature-toggle').on('change', (e) => {
5 6 7 8 9
    const el = e.target;

    Cookies.set(el.name, el.value, {
      expires: 365 * 10,
    });
10 11 12

    document.body.scrollTop = 0;
    window.location.reload();
13 14
  });
};