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