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

15 lines
285 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,
});
document.body.scrollTop = 0;
window.location.reload();
2017-06-16 11:38:45 -04:00
});
};