diff --git a/README.txt b/README.txt index f25c4e40..325e895f 100644 --- a/README.txt +++ b/README.txt @@ -105,11 +105,17 @@ ui-* cookies are for the client-side scripts only; in some configurations (eg with varnish cache) they will be stripped before they reach the server shm-* CSS classes are for javascript to hook into; if you're customising -themes, be careful with these, and avoid styling them +themes, be careful with these, and avoid styling them, eg: - shm-thumb = outermost element of a thumbnail - data-tags - data-post-id +- shm-toggler = click this to toggle elements that match the selector + - data-toggle-sel +- shm-unlocker = click this to unlock elements that match the selector + - data-unlock-sel +- shm-clink = a link to a comment, flash the target element when clicked + - data-clink-sel http://shimmie.shishnet.org/doc/ diff --git a/ext/index/script.js b/ext/index/script.js index 4a3663bf..f90bc95e 100644 --- a/ext/index/script.js +++ b/ext/index/script.js @@ -12,14 +12,16 @@ $(function() { // text-align: justify with element margins and doesn't recalculate // these margins when part of the line disappears... if(needs_refresh) { - $('.shm-image-list').hide(); - $('.shm-image-list').show(); + $('.shm-image-list').hide( + 0, + function() {$('.shm-image-list').show();} + ); } }); function select_blocked_tags() { var blocked_tags = prompt("Enter tags to ignore", $.cookie("ui-blocked-tags") || "My_Little_Pony"); - if(blocked_tags) { + if(blocked_tags !== null) { $.cookie("ui-blocked-tags", blocked_tags.toLowerCase(), {path: '/', expires: 365}); location.reload(true); } diff --git a/lib/shimmie.js b/lib/shimmie.js index 4a3775a6..4dc2e0ce 100644 --- a/lib/shimmie.js +++ b/lib/shimmie.js @@ -38,7 +38,7 @@ $(document).ready(function() { }); try { - var sidebar_hidden = ($.cookie("ui-sidebar-hidden") || $.cookie("sidebar-hidden") || "").split("|"); + var sidebar_hidden = ($.cookie("ui-sidebar-hidden") || "").split("|"); for(var i in sidebar_hidden) { if(sidebar_hidden.hasOwnProperty(i) && sidebar_hidden[i].length > 0) { $(sidebar_hidden[i]+" .blockbody").hide();