gitlab-org--gitlab-foss/app/assets/javascripts/experimental_flags.js

12 lines
221 B
JavaScript
Raw Normal View History

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,
});
});
};