gitlab-org--gitlab-foss/app/assets/javascripts/experimental_flags.js
2017-07-13 09:54:41 +01:00

14 lines
285 B
JavaScript

import Cookies from 'js-cookie';
export default () => {
$('.js-experiment-feature-toggle').on('change', (e) => {
const el = e.target;
Cookies.set(el.name, el.value, {
expires: 365 * 10,
});
document.body.scrollTop = 0;
window.location.reload();
});
};