diff options
| author | asiekierka <asiekierka@gmail.com> | 2012-12-24 13:16:12 +0100 |
|---|---|---|
| committer | asiekierka <asiekierka@gmail.com> | 2012-12-24 13:16:12 +0100 |
| commit | 7839d53b3a2c3ea6517ab9e6645bec4868d24233 (patch) | |
| tree | e95c9cce9b587b538994df3250e02d5ba374d6d3 /js/post-hider.js | |
| parent | ba1a4fc182ec206d11f26faa1a8e87db4207ae38 (diff) | |
PostHider: moved to localstorage
Diffstat (limited to 'js/post-hider.js')
| -rw-r--r-- | js/post-hider.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/js/post-hider.js b/js/post-hider.js index 625b28fa..2aefa39f 100644 --- a/js/post-hider.js +++ b/js/post-hider.js @@ -2,11 +2,11 @@ function phGetCookieName(id) { return "ph_hide_" + id; } function phPostHidden(id) { - return ($.cookie(phGetCookieName(id)) != null); + return (localStorage.getItem(phGetCookieName(id)) != null); } function phPostToggle(id) { - if(phPostHidden(id)) { $.cookie(phGetCookieName(id),null); } - else { $.cookie(phGetCookieName(id),"yes"); } + if(phPostHidden(id)) { localStorage.removeItem(phGetCookieName(id)); } + else { localStorage.setItem(phGetCookieName(id),"yes"); } } function phGetInnerText(id) { if(phPostHidden(id)) { return "[+]"; } |
