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 () => {
|
2017-06-19 12:01:18 -04: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
|
|
|
});
|
|
|
|
};
|