2018-03-09 15:18:59 -05:00
|
|
|
import $ from 'jquery';
|
2017-06-16 11:38:45 -04:00
|
|
|
import Cookies from 'js-cookie';
|
|
|
|
|
|
|
|
export default () => {
|
2020-12-23 16:10:24 -05:00
|
|
|
$('.js-experiment-feature-toggle').on('change', (e) => {
|
2017-06-16 11:38:45 -04:00
|
|
|
const el = e.target;
|
|
|
|
|
|
|
|
Cookies.set(el.name, el.value, {
|
|
|
|
expires: 365 * 10,
|
|
|
|
});
|
2017-07-13 04:54:41 -04:00
|
|
|
|
|
|
|
document.body.scrollTop = 0;
|
|
|
|
window.location.reload();
|
2017-06-16 11:38:45 -04:00
|
|
|
});
|
|
|
|
};
|