X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/bea8ac13e42fc53e2e2151503fa2a6a467b79844..5abc88f0d2ad3036dd526fbff5f0241f1d6480e1:/src/wolnelektury/static/js/base.js?ds=sidebyside diff --git a/src/wolnelektury/static/js/base.js b/src/wolnelektury/static/js/base.js index 8f26db440..01c6d4e4b 100644 --- a/src/wolnelektury/static/js/base.js +++ b/src/wolnelektury/static/js/base.js @@ -375,6 +375,13 @@ return false; }); + // experiments + $(".experiment input").on('change', function() { + let name = $(this).attr('name'); + let val = $(this).val(); + document.cookie = 'EXPERIMENT_' + name + '=' + val + '; path=/; max-age=31536000'; + window.location.reload(true); + }); }); })(jQuery);