X-Git-Url: https://git.mdrn.pl/emels.git/blobdiff_plain/228c34b6fb564b8f5444a72ceaec83448594c5a5..1b2d6e07836c08be40d19fcf35aa8b3080db7c7e:/emels/static/fnpdjango/annoy/annoy.js?ds=sidebyside diff --git a/emels/static/fnpdjango/annoy/annoy.js b/emels/static/fnpdjango/annoy/annoy.js deleted file mode 100644 index ad1444d..0000000 --- a/emels/static/fnpdjango/annoy/annoy.js +++ /dev/null @@ -1,40 +0,0 @@ -(function($) { -$(function() { - -$("#annoy").each(function(i, annoy) { - - var edition = "annoyed" + new Date().getFullYear(); - - var have_localstorage; - try { - localStorage.setItem("test", "test"); - localStorage.removeItem("test"); - have_localstorage = true; - } catch(e) { - have_localstorage = false; - } - - $("#annoy-on").click(function(e) { - e.preventDefault(); - $(annoy).slideDown('fast'); - $(this).hide(); - if (have_localstorage) localStorage.removeItem(edition); - }); - - $("#annoy-off").click(function() { - $(annoy).slideUp('fast'); - $("#annoy-on").show(); - if (have_localstorage) localStorage[edition] = true; - }); - - if (have_localstorage) { - if (!localStorage[edition]) { - $("#annoy-on").hide(); - $(annoy).show(); - } - } - }); - - -}); -})(jQuery);