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

16 lines
307 B
JavaScript
Raw Normal View History

import $ from 'jquery';
2017-06-16 11:38:45 -04:00
import Cookies from 'js-cookie';
export default () => {
2018-10-24 15:17:03 -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
});
};