X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/ad5acb886787871a70eee6385cddbb4238d3adb2..f7323c314c42bdc6ff17ec6f3804d6acc9a481ee:/src/wolnelektury/static/js/annoy.js diff --git a/src/wolnelektury/static/js/annoy.js b/src/wolnelektury/static/js/annoy.js index 6e613c713..f2a00f661 100644 --- a/src/wolnelektury/static/js/annoy.js +++ b/src/wolnelektury/static/js/annoy.js @@ -1,22 +1,24 @@ (function($) { $(function() { +var tag = "annoyed2019wspieraj"; + $("#annoy-on").click(function(e) { e.preventDefault(); $("#annoy").slideDown('fast'); $(this).hide(); - if (Modernizr.localstorage) localStorage.removeItem("annoyed2019tpwl"); + if (Modernizr.localstorage) localStorage.removeItem(tag); }); $("#annoy-off").click(function() { $("#annoy").slideUp('fast'); $("#annoy-on").show(); - if (Modernizr.localstorage) localStorage["annoyed2019tpwl"] = true; + if (Modernizr.localstorage) localStorage[tag] = true; }); if (Modernizr.localstorage) { - if (!localStorage["annoyed2019tpwl"]) { + if (!localStorage[tag]) { $("#annoy-on").hide(); $("#annoy").show(); }