diff options
-rw-r--r-- | view/js/main.js | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/view/js/main.js b/view/js/main.js index d022ee4a9..5c5e030c6 100644 --- a/view/js/main.js +++ b/view/js/main.js @@ -847,9 +847,21 @@ function scrollToItem() { function collapseHeight() { $(".wall-item-content:not('.divmore_checked'), .directory-collapse:not('.divmore_checked')").each(function(i) { - var orgHeight = $(this).outerHeight(true); - var id = $(this).attr('id') - var open = ((expanded_items.indexOf($(this).attr('id')) === -1) ? false : true); + let orgHeight = $(this).outerHeight(true); + let id = $(this).attr('id'); + + if (bParam_mid) { + // Display the selected mid in an open state + let num_id = id.split('wall-item-content-').pop(); + let b64mids = $('#thread-wrapper-' + num_id).data('b64mids'); + + if (b64mids.indexOf(bParam_mid) !== -1) {; + expanded_items.push(id); + } + } + + let open = ((expanded_items.indexOf(id) === -1) ? false : true); + if(orgHeight > divmore_height) { if(! $(this).hasClass('divmore') && $(this).has('div.no-collapse').length == 0) { $(this).readmore({ |