Allow hide-images.js, toggle-images.js and inline-expanding.js to work together

This commit is contained in:
Michael Foster 2013-07-27 00:14:43 -04:00
parent a11c8981fe
commit c0a45ba123
3 changed files with 52 additions and 15 deletions

View file

@ -53,7 +53,7 @@ $(document).ready(function(){
hidden_data[board][id] = Math.round(Date.now() / 1000);
store_data();
var show_link = $('<a href="javascript:void(0)">show</a>').click(function() {
var show_link = $('<a class="show-image-link" href="javascript:void(0)">show</a>').click(function() {
delete hidden_data[board][id];
store_data();
@ -66,6 +66,9 @@ $(document).ready(function(){
$(this).hide().after(show_link);
if ($(img).parent()[0].dataset.expanded == 'true') {
$(img).parent().click();
}
$(img)
.data('orig', img.src)
.attr('src', 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==')