X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/bea8ac13e42fc53e2e2151503fa2a6a467b79844..6dc65dcaa0245bfb27f1a857016b8c25f8214557:/src/wolnelektury/static/js/base.js 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);