diff options
Diffstat (limited to 'app/assets/javascripts/experimental_flags.js')
-rw-r--r-- | app/assets/javascripts/experimental_flags.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/app/assets/javascripts/experimental_flags.js b/app/assets/javascripts/experimental_flags.js new file mode 100644 index 00000000000..5564df25159 --- /dev/null +++ b/app/assets/javascripts/experimental_flags.js @@ -0,0 +1,11 @@ +import Cookies from 'js-cookie'; + +export default () => { + $('.js-expirement-feature-toggle').on('change', (e) => { + const el = e.target; + + Cookies.set(el.name, el.value, { + expires: 365 * 10, + }); + }); +}; |