X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/eb2eb95bfbfe8c777c4192ea434a0e999edf3a51..5abc88f0d2ad3036dd526fbff5f0241f1d6480e1:/src/wolnelektury/static/js/base.js?ds=inline 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);